ArvernOS
Loading...
Searching...
No Matches
wait.h File Reference
#include <sys/types.h>
Include dependency graph for wait.h:

Macros

#define WAIT_ANY   (-1)
 Wait for any child process.

Functions

pid_t waitpid (pid_t pid, int *status)

Function Documentation

◆ waitpid()

pid_t waitpid ( pid_t pid,
int * status )

Waits for a child process to change state.

Parameters
pidthe child to wait for (WAIT_ANY for any child)
statuswhere to store the child exit status (may be NULL)
Returns
the pid of the reaped child, or a negative error code