summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-08-01 20:35:24 +0000
committerpeter <peter@FreeBSD.org>2001-08-01 20:35:24 +0000
commit9f38eeae58dd06ae461509c2c3dfd2971aa6b20a (patch)
treeeedf93d8fb9694ea9b3ba08eac089263f2f15799 /sys/kern/kern_sig.c
parent95023d1052905a51057e35210a3a0fc390af4cfd (diff)
downloadFreeBSD-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/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c9
1 files changed, 5 insertions, 4 deletions
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