Red Hat Bugzilla – Bug 65790
exit () system call not thread safe
Last modified: 2008-05-01 11:38:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
Description of problem:
exit() system call is not thread safe. When can we expect a fix for this.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.compile/link attached test program with gcc for ia32
2.execution shows error.
Actual Results: "ERROR: creating thread" from test program
Expected Results: Exit with no error message
Created attachment 59124 [details]
Verified. Will work on this after the weekend.
If exit() is called more than once, the effects are undefined.
So I'm not exactly sure if we want to do anything about it.
I'll discuss this with other glibc authors.
It seems to me that the affected code should be calling pthread_exit rather than
exit, and that the failure helps to alert users to the error in their code.