* 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. */
| 935 | * hang-up all process in that group. |
| 936 | */ |
| 937 | static void |
| 938 | orphanpg(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 | |
| 962 | void |
| 963 | sess_hold(struct session *s) |
no test coverage detected