#include <wait.h>
Link against:
libc.lib
_W_INT (w) (*(int *)&(w))
Description
Macros to test the exit status returned by wait and extract the relevant values. Convert union wait to int.
Parameters
Interface status: |
externallyDefinedApi |
|
WCOREFLAG 0200
Description
Macros to test the exit status returned by wait and extract the relevant values.
_WSTATUS (x) (_W_INT(x) & 0177)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
_WSTOPPED 0177
Description
Macros to test the exit status returned by wait and extract the relevant values.
Interface status: |
externallyDefinedApi |
|
WIFSTOPPED (x) (_WSTATUS(x) == _WSTOPPED)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WSTOPSIG (x) (_W_INT(x) >> 8)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WIFSIGNALED (x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WTERMSIG (x) (_WSTATUS(x))
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WIFEXITED (x) (_WSTATUS(x) == 0)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WEXITSTATUS (x) (_W_INT(x) >> 8)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WIFCONTINUED (x) (x == 0x13)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WCOREDUMP (x) (_W_INT(x) & WCOREFLAG)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
W_EXITCODE (ret, sig) ((ret) << 8 | (sig))
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
W_STOPCODE (sig) ((sig) << 8 | _WSTOPPED)
Description
Macros to test the exit status returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WIFTERMINATED (x) (_WSTATUS(x)==1)
Description
Macros to test the termination code returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WTERMINATESTATUS (x) (_W_INT(x) >> 8)
Description
Macros to test the termination code returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WIFPANICED (x) (_WSTATUS(x)==2)
Description
Macros to test the panic code returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WPANICCODE (x) (_W_INT(x) >> 8)
Description
Macros to test the panic code returned by wait and extract the relevant values.
Parameters
Interface status: |
externallyDefinedApi |
|
WNOHANG 1
Description
Don't hang in wait.
Interface status: |
externallyDefinedApi |
|
WUNTRACED 2
Description
Tell about stopped, untraced children.
Interface status: |
externallyDefinedApi |
|
WCONTINUED 4
Description
Report a job control continued process.
WLINUXCLONE 0x80000000
Description
Wait for kthread spawned from linux_clone.
WAIT_ANY (-1)
Description
Any process. Tokens for special values of the pid parameter to wait4.
WAIT_MYPGRP 0
Description
Tokens for special values of the pid parameter to wait4. Any process in my process group.
Interface status: |
externallyDefinedApi |
|
IMPORT_C pid_t wait(int *);
Description
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
int * |
Note: This description also covers the following functions - waitpid
|
|
Return value
pid_t pid_t
|
If wait returns due to a stopped or terminated child process, the process ID of the child is returned to the calling process.
Otherwise, a value of -1 is returned and errno is set to indicate the error. If wait4 , wait3 , or waitpid returns due to
a stopped or terminated child process, the process ID of the child is returned to the calling process. If there are no children
not previously awaited, -1 is returned with errno set to ECHILD . Otherwise, if WNOHANG is specified and there are no stopped
or exited children, 0 is returned. If an error is detected or a caught signal aborts the call, a value of -1 is returned and
errno is set to indicate the error.
|
|
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C pid_t waitpid(pid_t, int *, int);
Description
Parameters
Return value
See also: