sl@0: /** @file ../include/sys/wait.h sl@0: @internalComponent sl@0: */ sl@0: sl@0: /** @fn wait(int *status) sl@0: @param status sl@0: sl@0: Note: This description also covers the following functions - sl@0: waitpid() sl@0: sl@0: @return If wait returns due to a stopped sl@0: or terminated child process, the process ID of the child sl@0: is returned to the calling process. sl@0: Otherwise, a value of -1 sl@0: is returned and errno is set to indicate the error. If wait4 , wait3 , sl@0: or waitpid returns due to a stopped sl@0: or terminated child process, the process ID of the child sl@0: is returned to the calling process. sl@0: If there are no children not previously awaited, sl@0: -1 is returned with errno set to ECHILD . sl@0: Otherwise, if WNOHANG is specified and there are sl@0: no stopped or exited children, sl@0: 0 is returned. sl@0: If an error is detected or a caught signal aborts the call, sl@0: a value of -1 sl@0: is returned and errno is set to indicate the error. sl@0: sl@0: The wait function suspends execution of its calling process until status information is available for a terminated child process, sl@0: or a signal is received. sl@0: On return from a successful wait call, sl@0: the status area contains termination information about the process that exited sl@0: as defined below. sl@0: sl@0: The wpid argument specifies the set of child processes for which to wait. sl@0: If wpid is -1, the call waits for any child process. sl@0: If wpid is 0, sl@0: the call waits for any child process in the process group of the caller. sl@0: If wpid is greater than zero, the call waits for the process with process id wpid . sl@0: If wpid is less than -1, the call waits for any process whose process group id sl@0: equals the absolute value of wpid . sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: The waitpid function is identical to wait4 with an rusage value of zero. sl@0: sl@0: Note: sl@0: sl@0: The waitpid function waits for a process ID which is obtained using a sl@0: non-standard API popen3 sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: @see _exit() sl@0: @see exit() sl@0: sl@0: sl@0: sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @fn waitpid(pid_t wpid, int *status, int options) sl@0: @param wpid sl@0: @param status sl@0: @param options sl@0: sl@0: Refer to wait() for the documentation sl@0: sl@0: @see _exit() sl@0: @see exit() sl@0: sl@0: sl@0: sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def _W_INT(w) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. Convert union wait to int. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: /** @def WCOREFLAG sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def _WSTATUS(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: /** @def _WSTOPPED sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: /** @def WIFSTOPPED(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WSTOPSIG(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WIFSIGNALED(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WTERMSIG(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WIFEXITED(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WEXITSTATUS(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WIFCONTINUED(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WCOREDUMP(x) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def W_EXITCODE(ret, sig) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def W_STOPCODE(sig) sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WIFTERMINATED(x) sl@0: sl@0: Macros to test the termination code returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WTERMINATESTATUS(x) sl@0: sl@0: Macros to test the termination code returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WIFPANICED(x) sl@0: sl@0: Macros to test the panic code returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WPANICCODE(x) sl@0: sl@0: Macros to test the panic code returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WNOHANG sl@0: sl@0: Don't hang in wait. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WUNTRACED sl@0: sl@0: Tell about stopped, untraced children. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def WCONTINUED sl@0: sl@0: Report a job control continued process. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def WAIT_ANY sl@0: sl@0: Any process. Tokens for special values of the pid parameter to wait4. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: sl@0: /** @def WCOREFLAG sl@0: sl@0: Macros to test the exit status returned by wait and extract the relevant values. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: sl@0: /** @def WLINUXCLONE sl@0: sl@0: Wait for kthread spawned from linux_clone. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: sl@0: /** @def WAIT_MYPGRP sl@0: sl@0: Tokens for special values of the pid parameter to wait4. Any process in my process group. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: