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-03 02:30 -------
Created an attachment (id=3705)
 --> (
Follow-up patch to previous patch to implement additional requirement.

Ulrich presented a firm requirement that once the main thread enters the
sys_exit system call, it must not respond to signals.

Yet, on the other hand, the process should externally respond to uses like
being suspended with SIGTSTP (POSIX job control) and GDB attaching to it.
Simply blocking all the signals in that thread does not work. What does work is
setting all of the signal actions to SIG_IGN; however, the signal handler array
is shared among all the threads.

What this patch does is it unshares the thread's signal handler array. For
this, I completed the signal handler unsharing support in the sys_unshare
system call. I also made that system call available for direct calling within
the kernel, as a do_unshare function. Calling do_unshare(CLONE_SIGHAND) causes
the calling task to have its own private signal handlers.


------- 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]