diff options
author | truckman <truckman@FreeBSD.org> | 2004-02-19 06:43:48 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2004-02-19 06:43:48 +0000 |
commit | 05861c09f2591dae649cc1ab2c0ba94e98472349 (patch) | |
tree | e9e9b0680a1c23c00edcd0fe56752bf446f7cbb1 /sys | |
parent | 7ae22c7183498247bd0c5d9bbf3902be44256bb0 (diff) | |
download | FreeBSD-src-05861c09f2591dae649cc1ab2c0ba94e98472349.zip FreeBSD-src-05861c09f2591dae649cc1ab2c0ba94e98472349.tar.gz |
A Linux thread created using clone() should not send SIGCHLD to its
parent if no signal is specified in the clone() flags argument.
PR: 42457
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 419c4b2..84c0680 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -470,10 +470,10 @@ exit1(struct thread *td, int rv) } else mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); - if (p->p_sigparent && p->p_pptr != initproc) - psignal(p->p_pptr, p->p_sigparent); - else + if (p->p_pptr == initproc) psignal(p->p_pptr, SIGCHLD); + else if (p->p_sigparent != 0) + psignal(p->p_pptr, p->p_sigparent); PROC_UNLOCK(p->p_pptr); /* |