diff options
| author | Jake Burkholder <jake@FreeBSD.org> | 2000-11-22 07:42:04 +0000 |
|---|---|---|
| committer | Jake Burkholder <jake@FreeBSD.org> | 2000-11-22 07:42:04 +0000 |
| commit | 553629ebc915f2377f1f2ce1bf02349db973e5ec (patch) | |
| tree | 710e5dfc75aebdd883e2714518ecbe82c1ef2cd9 /sys/kern/kern_exit.c | |
| parent | 8707b6f032bff12aedc08e6746078a12bc9fbbf0 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 489633a801f7..9e5d4883fa12 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -264,11 +264,13 @@ exit1(p, rv) * Remove proc from allproc queue and pidhash chain. * Place onto zombproc. Unlink from parent's child list. */ + lockmgr(&allproc_lock, LK_EXCLUSIVE, NULL, CURPROC); LIST_REMOVE(p, p_list); LIST_INSERT_HEAD(&zombproc, p, p_list); p->p_stat = SZOMB; LIST_REMOVE(p, p_hash); + lockmgr(&allproc_lock, LK_RELEASE, NULL, CURPROC); q = LIST_FIRST(&p->p_children); if (q) /* only need this if any child is S_ZOMB */ @@ -510,7 +512,9 @@ loop: * Unlink it from its process group and free it. */ leavepgrp(p); + lockmgr(&allproc_lock, LK_EXCLUSIVE, NULL, CURPROC); LIST_REMOVE(p, p_list); /* off zombproc */ + lockmgr(&allproc_lock, LK_RELEASE, NULL, CURPROC); LIST_REMOVE(p, p_sibling); if (--p->p_procsig->ps_refcnt == 0) { |
