Expand description
Process-group helpers shared by process execution backends.
On non-Unix platforms these helpers are no-ops.
Functions§
- detach_
from_ tty - Detach from the controlling TTY by starting a new session.
- kill_
by_ pid - Resolve a process group by PID and send SIGKILL.
- kill_
process_ group - Send SIGKILL to the process group
pgiddirectly — no lookup through the leader pid. This is the form that still reaches a group’s surviving members after the leader exited and was reaped:kill_by_pid’sgetpgidresolution returnsESRCHthen and silently spares them. A fully-gone group reads as success. Groups 0 and 1 are rejected rather than signalled: tokillpgthey mean the caller’s own group and init’s. - process_
group_ is_ alive - Whether any process remains in the group led by
pgid, including members that outlived the leader. Signal 0 runskillpg’s existence and permission checks without delivering anything, soEPERM(the group is another user’s) counts as alive. Groups 0 and 1 are rejected rather than probed: tokillpgthey mean the caller’s own group and init’s. - set_
parent_ death_ signal - Ensure the child receives SIGTERM when the original parent dies.
- set_
process_ group - Put the calling process into its own process group.