Macros to test the exit status returned by wait and extract the relevant values. Convert union wait to int.
Macros to test the termination code returned by wait and extract the relevant values.
IMPORT_C pid_t | wait | ( | int * | ) |
The wait function suspends execution of its calling process until status information is available for a terminated child process, or a signal is received. On return from a successful wait call, the status area contains termination information about the process that exited as defined below.
The wpid argument specifies the set of child processes for which to wait. If wpid is -1, the call waits for any child process. If wpid is 0, the call waits for any child process in the process group of the caller. If wpid is greater than zero, the call waits for the process with process id wpid . If wpid is less than -1, the call waits for any process whose process group id equals the absolute value of wpid .
The waitpid function is identical to wait4 with an rusage value of zero.
Note:
The waitpid function waits for a process ID which is obtained using a non-standard API popen3
Parameters | |
---|---|
Note: This description also covers the following functions - waitpid() |