This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
exit() fails to take the same lock as __cxa_atexit
- From: Joerg Pommnitz <pommnitz at yahoo dot com>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 29 Mar 2006 04:50:24 -0800 (PST)
- Subject: exit() fails to take the same lock as __cxa_atexit
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=OwKPP2b+zQpgVt2fUUZnl1k5ZP+3qG53XVW5LRZAJYbej2i3lSBaVfnHsNxm++BHxZWbQhiCBNAB1pCf1gKU7Su9BrOdH63kkLphPQYfoi1/NNN+JwGyG9nS0o6olbNbadOD62F1dGSBKbJccamMrqT1Ph2xn9hZdy0st9lNfb0= ;
- Reply-to: Joerg Pommnitz <pommnitz at yahoo dot com>
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