| 16 | #include "lwp_internal.h" |
| 17 | |
| 18 | static void jobctrl_set_pgrp_orphaned(struct rt_processgroup *pgrp) |
| 19 | { |
| 20 | rt_lwp_t proc, nx_proc; |
| 21 | PGRP_LOCK(pgrp); |
| 22 | |
| 23 | pgrp->is_orphaned = 1; |
| 24 | rt_list_for_each_entry(proc, &pgrp->process, pgrp_node) |
| 25 | { |
| 26 | LWP_LOCK(proc); |
| 27 | if (proc->jobctl_stopped) |
| 28 | { |
| 29 | LWP_UNLOCK(proc); |
| 30 | rt_list_for_each_entry_safe(proc, nx_proc, &pgrp->process, pgrp_node) |
| 31 | { |
| 32 | LWP_LOCK(proc); |
| 33 | lwp_signal_kill(proc, SIGHUP, SI_KERNEL, 0); |
| 34 | lwp_signal_kill(proc, SIGCONT, SI_KERNEL, 0); |
| 35 | LWP_UNLOCK(proc); |
| 36 | } |
| 37 | } |
| 38 | LWP_UNLOCK(proc); |
| 39 | } |
| 40 | |
| 41 | PGRP_UNLOCK(pgrp); |
| 42 | } |
| 43 | |
| 44 | void lwp_jobctrl_on_exit(struct rt_lwp *lwp) |
| 45 | { |
no test coverage detected