Ack with comments.

1) In the commit message:

* The component name should be base:, not CORE:

* The ticket number should be surrounded with square brackets so that 
SourceForge recognizes it as a ticket reference.

* The commit message should have a longer description explaining why 
this change was done (i.e. that we wish to dump coverage data on 
termination, but that exit() cannot be used since it is not thread-safe).

2) I usually prefer to use _Exit() over _exit() since the former one is 
declared as nothrow.

regards,
Anders Widell

2013-12-09 09:23, Hans Nordeback skrev:
>   osaf/libs/core/common/daemon.c |  8 +++++++-
>   1 files changed, 7 insertions(+), 1 deletions(-)
>
>
> use _exit instead of exit in daemon_exit
>
> diff --git a/osaf/libs/core/common/daemon.c b/osaf/libs/core/common/daemon.c
> --- a/osaf/libs/core/common/daemon.c
> +++ b/osaf/libs/core/common/daemon.c
> @@ -43,6 +43,8 @@
>   
>   #define DEFAULT_RUNAS_USERNAME      "opensaf"
>   
> +extern  void __gcov_flush(void) __attribute__((weak));
> +
>   static char __pidfile[NAME_MAX];
>   static char __tracefile[NAME_MAX];
>   static char __runas_username[UT_NAMESIZE];
> @@ -364,7 +366,11 @@ static void sigterm_handler(int sig)
>   void daemon_exit(void)
>   {
>       syslog(LOG_NOTICE, "exiting on signal %d", SIGTERM);
> -     exit(0);
> +
> +     if (__gcov_flush) {
> +             __gcov_flush();
> +     }
> +     _exit(0);
>   }
>   
>   /**


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to