Skip to main content

wait_exit

Function wait_exit 

Source
pub(crate) fn wait_exit(id: Id<'_>, flags: WaitPidFlag) -> Result<Option<i32>>
Expand description

Wait for the exit of a child like waitid(2) with WEXITED and flags, and return its exit code, the one of a signal like a shell reports it. None if it still runs, with WNOHANG. The wait of nix fails with EINVAL for a child killed by a real-time signal, which it does not know, after the kernel reaped it already.