summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-01-10 02:20:21 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-01-10 02:20:21 +0000
commita4ea7ab3f6f192b870945f28eb20a444fc365a89 (patch)
tree3dbc5c9b8ee35e7f1ad89177da324f03df01fb16 /sys/kern/kern_exit.c
parent40a4ee3d14430dc3d7820866cc688e3fb4f1e05e (diff)
Make RFNOWAIT work in rfork(2)
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index ad9d12bfab8..d925d666908 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.12 1997/11/06 05:58:16 csapuntz Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.13 1999/01/10 02:20:20 niklas Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -244,11 +244,11 @@ exit1(p, rv)
p->p_pctcpu = 0;
/*
- * Notify parent that we're gone. If parent has the P_NOCLDWAIT
- * flag set, notify process 1 instead (and hope it will handle
- * this situation).
+ * Notify parent that we're gone. If we have P_NOWAIT or parent has
+ * the P_NOCLDWAIT flag set, notify process 1 instead (and hope it
+ * will handle this situation).
*/
- if (p->p_pptr->p_flag & P_NOCLDWAIT) {
+ if ((p->p_flag & P_NOZOMBIE) || (p->p_pptr->p_flag & P_NOCLDWAIT)) {
struct proc *pp = p->p_pptr;
proc_reparent(p, initproc);
/*