Bug #2349 » dragonfly-SIGCHLD.patch
| sys/kern/kern_exit.c | ||
|---|---|---|
|
KNOTE(&p->p_klist, NOTE_EXIT);
|
||
|
/*
|
||
|
* Notify parent that we're gone. If parent has the PS_NOCLDWAIT
|
||
|
* flag set, notify process 1 instead (and hope it will handle
|
||
|
* this situation).
|
||
|
* 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).
|
||
|
*/
|
||
|
if (p->p_pptr->p_sigacts->ps_flag & PS_NOCLDWAIT) {
|
||
|
if (p->p_pptr->p_sigacts->ps_flag &
|
||
|
(PS_NOCLDWAIT | PS_CLDSIGIGN)) {
|
||
|
struct proc *pp = p->p_pptr;
|
||
|
PHOLD(pp);
|
||
| sys/kern/kern_sig.c | ||
|---|---|---|
|
} else {
|
||
|
p->p_sigacts->ps_flag &= ~PS_NOCLDWAIT;
|
||
|
}
|
||
|
if (ps->ps_sigact[_SIG_IDX(SIGCHLD)] == SIG_IGN)
|
||
|
ps->ps_flag |= PS_CLDSIGIGN;
|
||
|
else
|
||
|
ps->ps_flag &= ~PS_CLDSIGIGN;
|
||
|
}
|
||
|
/*
|
||
|
* Set bit in p_sigignore for signals that are set to SIG_IGN,
|
||
| ... | ... | |
|
/*
|
||
|
* Reset no zombies if child dies flag as Solaris does.
|
||
|
*/
|
||
|
p->p_sigacts->ps_flag &= ~PS_NOCLDWAIT;
|
||
|
p->p_sigacts->ps_flag &= ~(PS_NOCLDWAIT | PS_CLDSIGIGN);
|
||
|
if (ps->ps_sigact[_SIG_IDX(SIGCHLD)] == SIG_IGN)
|
||
|
ps->ps_sigact[_SIG_IDX(SIGCHLD)] = SIG_DFL;
|
||
|
}
|
||
|
/*
|
||
| sys/sys/param.h | ||
|---|---|---|
|
* 300100 - 3.1 master
|
||
|
* 300101 - i4b (ISDN) removal
|
||
|
* 300102 - <sys/ata.h> is now just a link of <sys/nata.h>
|
||
|
* 300103 - if SIG_IGN is set on SIGCHLD, do not keep zombie children
|
||
|
*/
|
||
|
#undef __DragonFly_version
|
||
|
#define __DragonFly_version 300102 /* propagated to newvers */
|
||
|
#define __DragonFly_version 300103 /* propagated to newvers */
|
||
|
#include <sys/_null.h>
|
||
| sys/sys/proc.h | ||
|---|---|---|
|
#define PS_NOCLDWAIT 0x0001 /* No zombies if child dies */
|
||
|
#define PS_NOCLDSTOP 0x0002 /* No SIGCHLD when children stop. */
|
||
|
#define PS_CLDSIGIGN 0x0004 /* The SIGCHLD handler is SIG_IGN. */
|
||
|
/*
|
||
|
* pargs, used to hold a copy of the command line, if it had a sane
|
||
- « Previous
- 1
- 2
- Next »