Expand description
Process liveness probe shared by the atomic-write orphan sweep and the
engine’s process management (ipc::process re-exports it).
signal_target and group_target are the only gates between a PID
and a signal syscall in LeanCTX. On Unix kill(2) gives PIDs outside
1..=i32::MAX a meaning nobody wants from a PID file: 0 is the caller’s
own process group and a u32 above i32::MAX wraps to a negative
pid_t, i.e. a process group, or with u32::MAX (-1) every process the
user may signal. Twice (2026-11-05, 2026-11-07) every process of a user
on pounce received SIGTERM; LeanCTX must never be able to do that.
Enums§
- PidFile
Error - Why the text of a PID file does not name a process.
- PidRefusal
- Why a PID may not be handed to a signal syscall.
Constants§
- MAX_PID
- The highest PID
pid_tcan hold; no supported OS hands out a larger one.
Functions§
- group_
target - The process-group id as a positive value for
killpg(pgid, …)orkill(-pgid, …), or why it may not be signalled: everythingsignal_targetrefuses, plus the group this process belongs to. - is_
alive - Check whether a process with the given PID is still running.
- parse_
pid_ file - Parse the text of a PID file (its first line, trimmed). Only a decimal
PID in
2..=i32::MAXis accepted; empty text, garbage, signs, zero, PID 1 and overflowing values are refused, so a corrupt file can never become a signal target. - signal_
target - The PID as a positive
pid_tthat addresses exactly one process, or why it may not be signalled: 0, 1, abovei32::MAX, or this process.