Make exit thread-safe

Kaz Kylheku kaz@ashi.footprints.net
Thu Feb 24 16:19:00 GMT 2005


On Thu, 24 Feb 2005, Sripathi Kodi wrote:

> I have noticed that exit() in stdlib/exit.c is not thread-safe. I have a 
> testcase that creates 10 threads, and they all call 'exit' almost 
> immediately.

Oops, that is not allowed. Is it not the case that a process can make
at most one call to exit or return from main. 

-- 
Meta-CVS: the working replacement for CVS that has been stable since
2002.  It versions the directory structure, symbolic links and execute
permissions. It figures out renaming on import. Plus it babysits the kids
and does light housekeeping! http://freshmeat.net/projects/mcvs



More information about the Libc-alpha mailing list