Skip to main content

Module process

Module process 

Source
Expand description

Shell-free process groups and bounded I/O, extracted/adapted from route_agent.

Functions§

bounded_command
bounded_command_until
bounded_command that also stops the command’s process group, with an Interrupted error, as soon as abort returns true. The command runs in its own group, so a terminal’s SIGINT to the caller does not reach it.
drain
Keep draining beyond the limit to avoid pipe deadlocks; never retain excess bytes.
drain_file
Bounded on-disk diagnostics, with pipes drained after cap is reached.
group
group_stopped
Check Linux process-group membership, counting zombies as already stopped. Returns an error when liveness cannot be established. Escaped sessions are outside the foreground backend’s contract; use systemd for containment.
terminate_process_group