mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 14:54:24 +00:00
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
This commit is contained in:
parent
ee84c5b19d
commit
c7fd62da6c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78056
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue