Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

wait(2) OSS System Calls Reference Manual
RETURN VALUES
If the wait() function returns because the status of a child process is available, the OSS process
ID of the child is returned to the calling process. If a signal is received via pthread_kill(2) that
is not blocked,ignored, or handled, -1 is returned with an errno of EINTR.
Upon any error, the value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the wait( ) function sets errno to the corresponding
value:
[ECHILD] The calling process has no existing unwaited-for child processes.
[EFAULT] The buffer pointed to by the status_location parameter failed bounds checking.
[EINTR] The function was terminated by receipt of a signal. The information pointed to
by the status_location parameter is not meaningful when this error occurs and
should not be used in further processing.
[ENOTOSS] The calling process was not an OSS process. The wait() function cannot be
used in the Guardian environment.
RELATED INFORMATION
Functions: exec(2), _exit(2), exit(3), fork(2), spt_waitpid(2), pause(3), sigaction(2),
tdm_execve(2), tdm_execvep(2), tdm_fork(2), tdm_spawn(2), tdm_spawnp(2), waitpid(2).
STANDARDS CONFORMANCE
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
The POSIX.1 standard states that when status information for two or more child
processes is available, the order in which the information is returned by the wait() func-
tion is unspecified. HP’s implementation also does not provide this information in a
specified sequence. The sequence should therefore not be depended upon for further
processing.
In addition to the status information mandated by the POSIX.1 standard, the HP imple-
mentation also returns status information for processes that terminate as a result of Guar-
dian procedure calls. In addition, status is returned for processes that terminate abnor-
mally as a result of a situation that is unique to NonStop server architecture, such as
failure of the child process’s processor while the parent process continues to execute.
The POSIX.1 standard indicates that the value in the location pointed to by the
status_location parameter is undefined when errno returns the value [EINTR]. HP’s
implementation also does not return meaningful information, and the value should not be
used for further processing.
This function does not conform to the async-signal safe requirement of the POSIX.1 standard.
106 Hewlett-Packard Company 527186-023