1sys_wait.h(0P)             POSIX Programmer's Manual            sys_wait.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       sys/wait.h — declarations for waiting
14

SYNOPSIS

16       #include <sys/wait.h>
17

DESCRIPTION

19       The <sys/wait.h> header shall define the following  symbolic  constants
20       for use with waitpid():
21
22       WCONTINUED    Report status of continued child process.
23
24       WNOHANG       Do  not  hang  if  no status is available; return immedi‐
25                     ately.
26
27       WUNTRACED     Report status of stopped child process.
28
29       The <sys/wait.h> header shall define the following macros for  analysis
30       of process status values:
31
32       WEXITSTATUS   Return exit status.
33
34       WIFCONTINUED  True if child has been continued.
35
36       WIFEXITED     True if child exited normally.
37
38       WIFSIGNALED   True if child exited due to uncaught signal.
39
40       WIFSTOPPED    True if child is currently stopped.
41
42       WSTOPSIG      Return signal number that caused process to stop.
43
44       WTERMSIG      Return signal number that caused process to terminate.
45
46       The  <sys/wait.h>  header shall define the following symbolic constants
47       as possible values for the options argument to waitid():
48
49       WEXITED       Wait for processes that have exited.
50
51       WNOWAIT       Keep the process whose status is returned in infop  in  a
52                     waitable state.
53
54       WSTOPPED      Status  is  returned  for any child that has stopped upon
55                     receipt of a signal.
56
57       The WCONTINUED and WNOHANG constants, described  above  for  waitpid(),
58       can also be used with waitid().
59
60       The  type idtype_t shall be defined as an enumeration type whose possi‐
61       ble values shall include at least the following: P_ALL P_PGID P_PID
62
63       The <sys/wait.h> header shall  define  the  id_t  and  pid_t  types  as
64       described in <sys/types.h>.
65
66       The <sys/wait.h> header shall define the siginfo_t type as described in
67       <signal.h>.
68
69       Inclusion of the <sys/wait.h> header may also make visible all  symbols
70       from <signal.h>.
71
72       The following shall be declared as functions and may also be defined as
73       macros. Function prototypes shall be provided.
74
75           pid_t  wait(int *);
76           int    waitid(idtype_t, id_t, siginfo_t *, int);
77           pid_t  waitpid(pid_t, int *, int);
78
79       The following sections are informative.
80

APPLICATION USAGE

82       None.
83

RATIONALE

85       None.
86

FUTURE DIRECTIONS

88       None.
89

SEE ALSO

91       <signal.h>, <sys_types.h>
92
93       The System Interfaces volume of POSIX.1‐2008, wait(), waitid()
94
96       Portions of this text are reprinted and reproduced in  electronic  form
97       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
98       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
99       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
100       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
101       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
102       event of any discrepancy between this version and the original IEEE and
103       The  Open Group Standard, the original IEEE and The Open Group Standard
104       is the referee document. The original Standard can be  obtained  online
105       at http://www.unix.org/online.html .
106
107       Any  typographical  or  formatting  errors that appear in this page are
108       most likely to have been introduced during the conversion of the source
109       files  to  man page format. To report such errors, see https://www.ker
110       nel.org/doc/man-pages/reporting_bugs.html .
111
112
113
114IEEE/The Open Group                  2013                       sys_wait.h(0P)
Impressum