|
|
HP-UX Reference Volume 3 of 5 > wwait3(2) |
|
NAMEwait3 — wait for child process to change state SYNOPSIS
#include <sys/wait.h> pid_t wait3 (int *stat_loc, int options, struct rusage *resource_usage); DESCRIPTIONThe wait3() function allows the calling process 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. ERRORSIn addition to the error conditions specified on waitpid(), under the following conditions, wait3() may fail and set errno to:
APPLICATION USAGEThreads ConsiderationsIn a multi-threaded application, only the calling thread is suspended by wait3(). wait3() will not return until all threads in the process have reached the desired state. For example, wait3() will not return until all threads have terminated. If the WUNTRACED or WCONTINUED options are specified, wait3() will not return until all threads have stopped or continued respectively. DESCRIPTIONThe wait3() system call is equivalent to waitpid() with the value of pid equal to zero. The third parameter to wait3(), reserved, is currently unused and must always be a null pointer. ERRORSIf wait3() fails, errno is set to one of the following values.
WARNINGSThe behavior of wait3() is affected if the SIGCLD signal is set to SIG_IGN. See the WARNINGS section of signal(5). Signal handlers that cause system calls to be restarted can affect the EINTR condition described above (see bsdproc(3C), sigaction(2), and sigvector(2)). |
|