HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)

w
wait(2) wait(2)
wait() and waitpid() will not return until all threads in the process have reached the desired state.
For example, the wait(), waitpid()
calls will not return until all threads have terminated. If the
WUNTRACED or WCONTINUED options are specified for the
waitpid() call, it will not return until all
threads have stopped or continued, respectively.
SEE ALSO
Exit conditions ($?) in sh(1); exec(2), exit(2), fork(2), pause(2), ptrace(2), signal(5), wait3(2), waitid(2),
<sys/types.h>, <sys/wait.h>.
AUTHOR
wait(), waitpid(), and wait3() were developed by HP, AT&T and the University of California, Berkeley.
CHANGE HISTORY
First released in Issue 1.
Derived from Issue 1 of the SVID.
Issue 4
The following change is incorporated for alignment with the ISO POSIX-1 standard:
Text describing conditions under which 0 will be returned when
WNOHANG is set in options is
added to the RETURN VALUE section.
Other changes are incorporated as follows:
The header
<sys/types.h> is now marked as optional (OH); this header need not be included
on XSI-conformant systems.
Error return values through out the DESCRIPTION and RETURN VALUE sections are changed
to show the proper casting (that is, (pid_t)-1.
The words "If the implementation supports job control" are removed from the description of
WUN-
TRACED
. This is because job control is defined as mandatory for Issue 4 conforming implementa-
tions.
Issue 4, Version 2
The following changes are incorporated in the DESCRIPTION for X/OPEN UNIX conformance:
The WCONTINUED options flag and the WIFCONTINUED(stat_val)
macro are added.
Text following the list of options flags explains the implications of setting the
SA_NOCLDWAIT sig-
nal flag or setting
SIGCHILD to SIG_IGN.
Text following the list of macros, which explains what macros return non-zero values in certain
cases, is expanded and the value of the WCONTINUED flag on the previous call to
waitpid() is
taken into account.
STANDARDS CONFORMANCE
wait(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
waitpid(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
526 Hewlett-Packard Company 4 HP-UX 11i Version 2: December 2007 Update