This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/9804] pthread_exit from main thread: poor semantics, potential tty session lockup.
- From: "kkylheku at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 3 Feb 2009 02:30:34 -0000
- Subject: [Bug nptl/9804] pthread_exit from main thread: poor semantics, potential tty session lockup.
- References: <20090131031846.9804.kkylheku@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From kkylheku at gmail dot com 2009-02-03 02:30 -------
Created an attachment (id=3705)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3705&action=view)
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.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=9804
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.