summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-10-25 06:18:04 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-10-25 06:18:04 +0000
commit4889cc1ac49302812a7e00fb0e72972f1ad9a47b (patch)
tree2b0e8f6fd8ee218b26cec1b7e6a623b4bd535ff4 /sys/kern/kern_exit.c
parent3015e34f1c3fab39f699d47338f6e344ee202ce2 (diff)
downloadFreeBSD-src-4889cc1ac49302812a7e00fb0e72972f1ad9a47b.zip
FreeBSD-src-4889cc1ac49302812a7e00fb0e72972f1ad9a47b.tar.gz
Move sigqueue_take() call into proc_reparent(), this fixed bugs where
proc_reparent() is called but sigqueue_take() is forgotten.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 6ed8f4c..6910903 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -197,10 +197,6 @@ retry:
while (p->p_lock > 0)
msleep(&p->p_lock, &p->p_mtx, PWAIT, "exithold", 0);
- PROC_LOCK(p->p_pptr);
- sigqueue_take(p->p_ksi);
- PROC_UNLOCK(p->p_pptr);
-
PROC_UNLOCK(p);
#ifdef AUDIT
@@ -903,6 +899,9 @@ proc_reparent(struct proc *child, struct proc *parent)
if (child->p_pptr == parent)
return;
+ PROC_LOCK(child->p_pptr);
+ sigqueue_take(child->p_ksi);
+ PROC_UNLOCK(child->p_pptr);
LIST_REMOVE(child, p_sibling);
LIST_INSERT_HEAD(&parent->p_children, child, p_sibling);
child->p_pptr = parent;
OpenPOWER on IntegriCloud