This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/9804] pthread_exit from main thread: poor semantics, potential tty session lockup.

------- Additional Comments From kkylheku at gmail dot com  2009-02-01 21:14 -------
I now have a kernel patch that solves this for me.

I modified the sys_exit system call to cause the parent thread to wait for all 
the other threads to die.   If, while waiting, the parent thread gets a non-
fatal signal, it returns -ERESTARTSYS. I.e. it's returning from sys_exit, 
which normally does not happen.  This allows the signal handling to be done 
and sys_exit to be restarted.  If a fatal signal happens, then the exit goes 

This appears to be working perfectly for me. I can now suspend and resume the 
process even if the main thread has already terminated with pthread_exit. All 
of the threads suspend and resume properly. There is no hang.

I am marking this bug WONTFIX, because it's positively, definitely a kernel 
problem that requires no glibc changes. The kernel is simply not doing its 
part in supporting the semantics of pthread_exit from the primary thread.


           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]