summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2001-06-11 09:15:41 +0000
committerdwmalone <dwmalone@FreeBSD.org>2001-06-11 09:15:41 +0000
commit46ac202c04e1956fed92a47ee5c155eecf11695b (patch)
treec0005bc0bc34eff423b0cce9b6ae714733e4d2f8 /sys/kern/kern_sig.c
parentf07123d0f11adafcd5d9e0d65260bf9b0f051f5e (diff)
downloadFreeBSD-src-46ac202c04e1956fed92a47ee5c155eecf11695b.zip
FreeBSD-src-46ac202c04e1956fed92a47ee5c155eecf11695b.tar.gz
Try to make the setting of the SIGCHLD handler the same as setting of
the NOCLDWAI flag. Susv2 seems to require this. Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz> Reviewed by: dillon
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index ae68268..1307b5c 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -293,7 +293,8 @@ do_sigaction(p, sig, act, oact, old)
p->p_procsig->ps_flag |= PS_NOCLDSTOP;
else
p->p_procsig->ps_flag &= ~PS_NOCLDSTOP;
- if (act->sa_flags & SA_NOCLDWAIT) {
+ if ((act->sa_flags & SA_NOCLDWAIT) ||
+ ps->ps_sigact[_SIG_IDX(SIGCHLD)] == SIG_IGN) {
/*
* Paranoia: since SA_NOCLDWAIT is implemented
* by reparenting the dying child to PID 1 (and
@@ -468,6 +469,8 @@ execsigs(p)
* Reset no zombies if child dies flag as Solaris does.
*/
p->p_procsig->ps_flag &= ~PS_NOCLDWAIT;
+ if (ps->ps_sigact[_SIG_IDX(SIGCHLD)] == SIG_IGN)
+ ps->ps_sigact[_SIG_IDX(SIGCHLD)] = SIG_DFL;
PROC_UNLOCK(p);
}
OpenPOWER on IntegriCloud