summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 59a1a4c..6cc3e0a 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -732,7 +732,8 @@ loop:
mtx_unlock(&Giant);
return (0);
}
- if (P_SHOULDSTOP(p) && ((p->p_flag & P_WAITED) == 0) &&
+ if (P_SHOULDSTOP(p) && (p->p_suspcount == p->p_numthreads) &&
+ ((p->p_flag & P_WAITED) == 0) &&
(p->p_flag & P_TRACED || uap->options & WUNTRACED)) {
p->p_flag |= P_WAITED;
sx_xunlock(&proctree_lock);
OpenPOWER on IntegriCloud