summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exit.c7
-rw-r--r--sys/kern/kern_sig.c9
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 4597f30..d73c70b 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -329,11 +329,10 @@ exit1(p, rv)
/*
* Notify parent that we're gone. If parent has the PS_NOCLDWAIT
- * flag set, or if the handler is set to SIG_IGN, notify process
- * 1 instead (and hope it will handle this situation).
+ * flag set, notify process 1 instead (and hope it will handle
+ * this situation).
*/
- if ((p->p_pptr->p_procsig->ps_flag & PS_NOCLDWAIT)
- || p->p_pptr->p_sigacts->ps_sigact[_SIG_IDX(SIGCHLD)] == SIG_IGN) {
+ if (p->p_pptr->p_procsig->ps_flag & PS_NOCLDWAIT) {
struct proc *pp = p->p_pptr;
proc_reparent(p, initproc);
/*
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 67945b0..4784e40 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -255,11 +255,11 @@ do_sigaction(p, sig, act, oact, old)
ps->ps_catchmask[_SIG_IDX(sig)] = act->sa_mask;
SIG_CANTMASK(ps->ps_catchmask[_SIG_IDX(sig)]);
if (act->sa_flags & SA_SIGINFO) {
- ps->ps_sigact[_SIG_IDX(sig)] =
- (__sighandler_t *)act->sa_sigaction;
+ ps->ps_sigact[_SIG_IDX(sig)] = act->sa_handler;
SIGADDSET(ps->ps_siginfo, sig);
} else {
- ps->ps_sigact[_SIG_IDX(sig)] = act->sa_handler;
+ ps->ps_sigact[_SIG_IDX(sig)] =
+ (__sighandler_t *)act->sa_sigaction;
SIGDELSET(ps->ps_siginfo, sig);
}
if (!(act->sa_flags & SA_RESTART))
@@ -289,7 +289,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
OpenPOWER on IntegriCloud