diff options
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index bf13a9d..bdee5f4 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -264,14 +264,15 @@ proc_fini(void *mem, int size) * Is p an inferior of the current process? */ int -inferior(p) - register struct proc *p; +inferior(struct proc *p) { sx_assert(&proctree_lock, SX_LOCKED); - for (; p != curproc; p = p->p_pptr) + PROC_LOCK_ASSERT(p, MA_OWNED); + for (; p != curproc; p = proc_realparent(p)) { if (p->p_pid == 0) return (0); + } return (1); } |