exit() fails to take the same lock as __cxa_atexit

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

exit() fails to take the same lock as __cxa_atexit

Joerg Pommnitz
Hello all,
exit changes the same global data (e.g.__exit_funcs) that __cxa_atexit changes. Shouldn't it take the same lock?

The problem: I see hanging exit() calls in a program that exits on SIGPIPE and write() == -1 in different threads (exit is not called from a signal context, btw.). The problem seems to go away with _exit().

This is on Linux/ia32 with glibc-2.3.2, but the exit function hasn't changed much.
 
--  Regards
       Joerg