Skip to main content

waitpid

Function waitpid 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn waitpid( pid: pid_t, stat_loc: *mut c_int, options: c_int, ) -> pid_t
Expand description

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/waitpid.html.

Obtains status information pertaining to one of the caller’s child processes.

If returning because the status of a child process is available, returns a value equal to the process ID of the child process for which status is reported. If returning due to the delivery of a signal to the calling process, returns -1 and sets errno to EINTR. if invoked with WNOHANG set in options, it has at least one child process specified by pid for wchich status is not available, and status is not available for any process specified by pid, 0 is returned. If otherwise failing, returns -1 and sets errno.