NAME
wait3 — wait for a
child process to change state (LEGACY)
SYNOPSIS
#include <sys/wait.h> pid_t wait3 (int *stat_loc, int options, struct rusage *resource_usage);
DESCRIPTION
The wait3() function allows the calling thread to obtain status information for specified child processes.
The following call:
wait3(stat_loc, options, resource_usage); is
equivalent to the call: waitpid((pid_t)-1, stat_loc,
options); except that on successful completion, if the
resource_usage
argument to
wait3()
is not a null pointer, the rusage structure that the third argument points
to is filled in for the child process identified by the return value.
This interface need not be reentrant.
RETURN VALUE
See waitpid(3) .
ERRORS
In addition to the error conditions specified on waitpid(3) , under the following conditions, wait3() may fail and set errno to:
EXAMPLES
None.
APPLICATION USAGE
New applications should use waitpid(3) .
FUTURE DIRECTIONS
None.
SEE ALSO
exec(3) , exit(3) , fork(3) , pause(3) , waitpid(3) , <sys/wait.h> .