diff options
author | peter <peter@FreeBSD.org> | 2001-08-01 20:35:24 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-08-01 20:35:24 +0000 |
commit | 9f38eeae58dd06ae461509c2c3dfd2971aa6b20a (patch) | |
tree | eedf93d8fb9694ea9b3ba08eac089263f2f15799 /sys/kern | |
parent | 95023d1052905a51057e35210a3a0fc390af4cfd (diff) | |
download | FreeBSD-src-9f38eeae58dd06ae461509c2c3dfd2971aa6b20a.zip FreeBSD-src-9f38eeae58dd06ae461509c2c3dfd2971aa6b20a.tar.gz |
Temporarily back out kern_sig.c rev 1.125 and kern_exit.c rev 1.131.
This paniced my one of my machines one time too many :-( and there is
no sign of a solution in the pipeline. The deltas are still easily
available in cvs. The problem is that if the parent has been swapped
out, the child process cannot grope around in the parent's UPAGES to
see the sigact[] array or it will fault. This probably is a showstopper
for this implementation anyway.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exit.c | 7 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 9 |
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 |