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

Function orphanpg

freebsd/kern/kern_proc.c:937–960  ·  view source on GitHub ↗

* A process group has become orphaned, mark it as such for signal * delivery code. If there are any stopped processes in the group, * hang-up all process in that group. */

Source from the content-addressed store, hash-verified

935 * hang-up all process in that group.
936 */
937static void
938orphanpg(struct pgrp *pg)
939{
940 struct proc *p;
941
942 PGRP_LOCK_ASSERT(pg, MA_OWNED);
943
944 pg->pg_flags |= PGRP_ORPHANED;
945
946 LIST_FOREACH(p, &pg->pg_members, p_pglist) {
947 PROC_LOCK(p);
948 if (P_SHOULDSTOP(p) == P_STOPPED_SIG) {
949 PROC_UNLOCK(p);
950 LIST_FOREACH(p, &pg->pg_members, p_pglist) {
951 PROC_LOCK(p);
952 kern_psignal(p, SIGHUP);
953 kern_psignal(p, SIGCONT);
954 PROC_UNLOCK(p);
955 }
956 return;
957 }
958 PROC_UNLOCK(p);
959 }
960}
961
962void
963sess_hold(struct session *s)

Callers 2

doenterpgrpFunction · 0.85
fixjobc_killFunction · 0.85

Calls 1

kern_psignalFunction · 0.85

Tested by

no test coverage detected