diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2009-06-24 13:03:21 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2009-06-24 13:03:21 +0000 |
commit | fe9a2c4a39eecd0aa4fe01ef32458c15640d3e25 (patch) | |
tree | dca3454f9d371304792d20c7cf5867396a26e9af /sys/kern | |
parent | 4c4e676b49c9565d44d2622434615b391e083f33 (diff) |
Remove extra psignal/wakeup in exit1() which can cause the parent to
receive SIGCHLD twice if scheduled before the reaper runs. diff by
guenther@ and myself. okay guenther@ deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exit.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e69c45f2a6a..23c11c5283a 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.84 2009/04/03 04:22:49 guenther Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.85 2009/06/24 13:03:20 kurt Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -304,10 +304,6 @@ exit1(struct proc *p, int rv, int flags) wakeup(pp); } - if (p->p_exitsig != 0) - psignal(p->p_pptr, P_EXITSIG(p)); - wakeup(p->p_pptr); - /* * Release the process's signal state. */ @@ -408,8 +404,9 @@ reaper(void) if ((p->p_flag & P_NOZOMBIE) == 0) { p->p_stat = SZOMB; + if (P_EXITSIG(p) != 0) + psignal(p->p_pptr, P_EXITSIG(p)); /* Wake up the parent so it can get exit status. */ - psignal(p->p_pptr, SIGCHLD); wakeup(p->p_pptr); } else { /* Noone will wait for us. Just zap the process now */ |