Function rustix::process::wait

source ·
pub fn wait(waitopts: WaitOptions) -> Result<Option<(Pid, WaitStatus)>>
Expand description

wait(waitopts)—Wait for any of the children of calling process to change state.

On success, returns the pid of the child process whose state changed, and the status of said process.

If NOHANG was specified in the options, and the selected child process didn’t change state, returns None.

References