diff options
-rw-r--r-- | sys/kern/kern_exit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 4795779..6c4f3d8 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc *p, int *status, int options, LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + PROC_LOCK(p); if (p->p_flag & P_ORPHAN) { LIST_REMOVE(p, p_orphan); p->p_flag &= ~P_ORPHAN; } + PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL) |