MCPcopy Create free account
hub / github.com/F-Stack/f-stack / inferior

Function inferior

freebsd/kern/kern_proc.c:372–383  ·  view source on GitHub ↗

* Is p an inferior of the current process? */

Source from the content-addressed store, hash-verified

370 * Is p an inferior of the current process?
371 */
372int
373inferior(struct proc *p)
374{
375
376 sx_assert(&proctree_lock, SX_LOCKED);
377 PROC_LOCK_ASSERT(p, MA_OWNED);
378 for (; p != curproc; p = proc_realparent(p)) {
379 if (p->p_pid == 0)
380 return (0);
381 }
382 return (1);
383}
384
385/*
386 * Shared lock all the pid hash lists.

Callers 1

sys_setpgidFunction · 0.85

Calls 1

proc_realparentFunction · 0.85

Tested by

no test coverage detected