From 05861c09f2591dae649cc1ab2c0ba94e98472349 Mon Sep 17 00:00:00 2001 From: truckman Date: Thu, 19 Feb 2004 06:43:48 +0000 Subject: 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 --- sys/kern/kern_exit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern') 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); /* -- cgit v1.1