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

Function pgfind

freebsd/kern/kern_proc.c:484–498  ·  view source on GitHub ↗

* Locate a process group by number. * The caller must hold proctree_lock. */

Source from the content-addressed store, hash-verified

482 * The caller must hold proctree_lock.
483 */
484struct pgrp *
485pgfind(pid_t pgid)
486{
487 struct pgrp *pgrp;
488
489 sx_assert(&proctree_lock, SX_LOCKED);
490
491 LIST_FOREACH(pgrp, PGRPHASH(pgid), pg_hash) {
492 if (pgrp->pg_id == pgid) {
493 PGRP_LOCK(pgrp);
494 return (pgrp);
495 }
496 }
497 return (NULL);
498}
499
500/*
501 * Locate process and do additional manipulations, depending on flags.

Callers 11

tty_generic_ioctlFunction · 0.70
killpg1Function · 0.70
gsignalFunction · 0.70
enterpgrpFunction · 0.70
kern_procctlFunction · 0.70
sys_setsidFunction · 0.70
sys_setpgidFunction · 0.70
fsetownFunction · 0.70
sys_ktraceFunction · 0.70
kern_getpriorityFunction · 0.70
kern_setpriorityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected