osaf/libs/core/common/daemon.c | 9 ++---
1 files changed, 6 insertions(+), 3 deletions(-)
By calling exit() instead of _Exit() registered exit functions are called. This
enabled for example flushing of gcov data.
diff --git a/osaf/libs/core/common/daemon.c b/osaf/libs/core/common/daemon.c
On a related topic, I had this patch written(untested) sometime back for the
rest of the services
Some things to consider
- add graceful (pthread cancel and join) exit for log service(now that there is
a separate thread introduced)
- see if imm's sub processes needs-to/can be gracefully shutdow
I am a bit suspicious about cancelling threads - the safest solution is
if you can ask the thread nicely to shut down itself.
Regarding the problems we had in IMM related to calling exit() - there
is actually a coding rule in the Google coding standard that forbids
global objects:
http://googl
Great that you have done this but I think you should split your patch into
several per service or even per daemon.
Thanks,
Hans
On 10/07/2013 10:06 AM, Mathivanan Naickan Palanivelu wrote:
> On a related topic, I had this patch written(untested) sometime back for the
> rest of the services
> Som
> -Original Message-
> From: Anders Widell [mailto:anders.wid...@ericsson.com]
> Sent: Monday, October 07, 2013 5:58 PM
> To: Mathivanan Naickan Palanivelu; Hans Feldt
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 1 of 1] opensaf: change daemon_exit to call exit() [#581]
Ack from me.
I guess we should also go through the code and make sure we follow this
rule from the Google C++ Style guide:
Static and Global Variables
Static or global variables of class type are forbidden: they cause
hard-to-find bugs due to indeterminate order of construction and
destructio
; mathi.naic...@oracle.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to call exit()
[#581]
Ack from me.
I guess we should also go through the code and make sure we follow this rule
from the Google C++ Style guide:
Static and Global
ersBj
>
> -Original Message-
> From: Anders Widell [mailto:anders.wid...@ericsson.com]
> Sent: den 9 oktober 2013 15:52
> To: Hans Feldt; mathi.naic...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to c
: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to call exit()
[#581]
Wasn't it IMM that got into trouble last time we played with exit() :-)
These objects will be destroyed when we call exit(). Are they accessed by any
thread besides the main thread?
Anyway, I suppose it wouldn
To: Anders Widell; Hans Feldt; mathi.naic...@oracle.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to call exit()
[#581]
Played with exit?
Are you referring to the episode with illegal stuff in the signal handler ?
/AndersBj
-Origin
9 oktober 2013 19:23
To: Anders Widell; Hans Feldt; mathi.naic...@oracle.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to call exit()
[#581]
Played with exit?
Are you referring to the episode with illegal stuff in the signal handler ?
om]
> Sent: den 9 oktober 2013 19:33
> To: Anders Widell; Hans Feldt; mathi.naic...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to call
> exit() [#581]
>
> And no they are not acccessed by any other thread
sson.com]
> Sent: den 9 oktober 2013 19:33
> To: Anders Widell; Hans Feldt; mathi.naic...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to
> call exit() [#581]
>
> And no they are not acccessed by any other t
t; /AndersBj
>
> -Original Message-
> From: Anders Widell
> Sent: den 10 oktober 2013 10:32
> To: Anders Björnerstedt; Hans Feldt; mathi.naic...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to ca
; Hans Feldt; mathi.naic...@oracle.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [devel] [PATCH 1 of 1] opensaf: change daemon_exit to call exit()
[#581]
Yes, but even if you protect the global data with e.g. a mutex, you can still
get unexpected problems when you call exit(). exit() will
rt().
>>>
>>> But I have never seen any interference caused by that, such as
>>> strange core dumps while navigating the statically allocated c++ data.
>>>
>>> Only the exit donw by the signal handler has caused that kind of problem.
>>>
>
16 matches
Mail list logo