[PATCH] Fix the race between atexit() and exit()
Carlos O'Donell
carlos@systemhalted.org
Wed Jun 4 13:54:00 GMT 2008
On Wed, Jun 4, 2008 at 9:13 AM, Anoop <acv@linux.vnet.ibm.com> wrote:
> Though it doesnt say it is thread safe, atexit() is not listed in the
> thread-unsafe functions listed in sextion 2.9.1 -
> http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01
> where it says - All functions defined by this volume of IEEE Std 1003.1-2001
> shall be thread-safe, except that the following functions need not be
> thread-safe.
Once you call exit(), don't all the consequence apply e.g. the parent
process is destroyed, and all children are zombies. This implies that
any additional atexit() registered handlers do *not* have to be run
since the parent has already exited, and will never do so again?
Cheers,
Carlos.
More information about the Libc-help
mailing list