* Is p an inferior of the current process? */
| 370 | * Is p an inferior of the current process? |
| 371 | */ |
| 372 | int |
| 373 | inferior(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. |
no test coverage detected