RETURN VALUE
The process ID of the child which exited, or zero if WNOHANG was used and no child was available, or -1 on error [b](in which case errno is set to an appropriate value). [/b]
ERRORS
ECHILD
if the process specified in pid does not exist or is not a child of the calling process. (This can happen for one's own child if the action for SIGCHLD is set to SIG_IGN. See also the LINUX NOTES section about threads.)
EINVAL
if the options argument was invalid.
EINTR
if WNOHANG was not set and an unblocked signal or a SIGCHLD was caught.
The process ID of the child which exited, or zero if WNOHANG was used and no child was available, or -1 on error [b](in which case errno is set to an appropriate value). [/b]
ERRORS
ECHILD
if the process specified in pid does not exist or is not a child of the calling process. (This can happen for one's own child if the action for SIGCHLD is set to SIG_IGN. See also the LINUX NOTES section about threads.)
EINVAL
if the options argument was invalid.
EINTR
if WNOHANG was not set and an unblocked signal or a SIGCHLD was caught.