|
|
MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4
POSIX/iX Library Function Descriptions
wait |
|
Suspends the calling process to wait for exit status of child processes.
The wait() function suspends the calling process until status information for one of its terminated child processes is available. If status information is already available, wait() returns immediately. If the calling process receives a signal whose action is to terminate, the calling process terminates. If the calling process receives a signal whose action is to execute a signal handling function, wait() returns to the calling process. If status is available for more than one process, the order in which their status is reported may not correspond to the order of their termination. The wait() function returns to the argument pointed to by stat_loc an exit status of 0 if, and only if, the child process that returned status took one of the following two actions:
The following macros that evaluate the stat_loc parameter, regardless of its value, are defined in the header <sys/wait.h>:
Refer to the EFAULT error description below. If a parent process terminates without waiting for all of its child processes to terminate, the remaining child processes are terminated. If an error occurs, errno is set to one of the following values:
|
|