mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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.
This commit is contained in:
parent
635751fa8c
commit
aa7a4dae6d
2 changed files with 8 additions and 8 deletions
|
|
@ -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);
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue