Skip to main content

terminate

Function terminate 

Source
pub fn terminate(pid: u32) -> bool
Expand description

Send SIGTERM to pid — the crate’s one process-termination call, used by devflow stop’s signalling fallback (23c). Applies exactly the same guards agent_running applies, for reasons that are catastrophic here rather than merely wrong: signalling pid 0 would target the caller’s own process group (kill(0, sig) reaches every process in the group, including this one), and a value above i32::MAX would wrap negative through the as libc::pid_t cast — kill(-1, sig) sends the signal to every process the caller may signal. Returns whether the signal was delivered.