summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-03-02 22:19:10 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-03-02 22:19:10 +0000
commit420ba78faddcea69f80b74b3f4275d187dea6908 (patch)
tree2834880147691ff9a0156f000f7ef173baf3ad36 /sys/kern/kern_exit.c
parentc7b966e37e53fdcbfa53940d7fc857b7a32d0d25 (diff)
RFNOWAIT does not dissociate the child from its parent in any other
way than that the parent wait call will never get the status of this child, says Rob
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index a23a4aaac57..245e6c62015 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.15 1999/02/26 05:06:34 art Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.16 1999/03/02 22:19:09 niklas Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -335,9 +335,10 @@ sys_wait4(q, v, retval)
loop:
nfound = 0;
for (p = q->p_children.lh_first; p != 0; p = p->p_sibling.le_next) {
- if (SCARG(uap, pid) != WAIT_ANY &&
+ if ((p->p_flag & P_NOZOMBIE) ||
+ (SCARG(uap, pid) != WAIT_ANY &&
p->p_pid != SCARG(uap, pid) &&
- p->p_pgid != -SCARG(uap, pid))
+ p->p_pgid != -SCARG(uap, pid)))
continue;
nfound++;
if (p->p_stat == SZOMB) {