Function base::sys::linux::wait_for_pid

source ·
pub fn wait_for_pid<A: AsRawPid>(
    pid: A,
    options: c_int
) -> Result<(Option<Pid>, ExitStatus)>
Expand description

A safe wrapper around waitpid.

On success if a process was reaped, it will be returned as the first value. The second returned value is the ExitStatus from the libc::waitpid() call.

Note: this can block if libc::WNOHANG is not set and EINTR is not handled internally.