Remove the check that prevented signals from being delivered to exiting

processes.  It was originally added back when support for Linux threads
(and thus shared sigacts objects) was added, but no one knows why.  My
guess is that at some point during the Linux threads patches, the sigacts
object was torn down during exit1(), so this check was added to prevent
a panic for that race.  However, the stuff that was actually committed to
the tree doesn't teardown sigacts until wait() making the above race moot.
Re-allowing signals here lets one interrupt a NFS request during process
teardown (such as closing descriptors) on an interruptible mount.

Requested by:	kib (long time ago)
MFC after:	1 week
This commit is contained in:
jhb 2006-10-20 16:19:21 +00:00
parent df52e86556
commit 4cc0b2f46e

View File

@ -2119,15 +2119,13 @@ do_tdsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi)
/*
* If the signal is being ignored,
* or process is exiting or thread is exiting,
* then we forget about it immediately.
* (Note: we don't set SIGCONT in ps_sigignore,
* and if it is set to SIG_IGN,
* action will be SIG_DFL here.)
*/
mtx_lock(&ps->ps_mtx);
if (SIGISMEMBER(ps->ps_sigignore, sig) ||
(p->p_flag & P_WEXIT)) {
if (SIGISMEMBER(ps->ps_sigignore, sig)) {
mtx_unlock(&ps->ps_mtx);
if (ksi && (ksi->ksi_flags & KSI_INS))
ksiginfo_tryfree(ksi);