summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1999-03-02 22:19:08 +0000
committerniklas <niklas@openbsd.org>1999-03-02 22:19:08 +0000
commitebd6dabbd1ad6ca3bf257da2925a88b3f7d676fb (patch)
tree1645dd057c300caa0beef08ead193c40b97290e5 /sys/kern/kern_exit.c
parentShouldn't be here. Autogenerated. (diff)
downloadwireguard-openbsd-ebd6dabbd1ad6ca3bf257da2925a88b3f7d676fb.tar.xz
wireguard-openbsd-ebd6dabbd1ad6ca3bf257da2925a88b3f7d676fb.zip
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) {