xref: /xnu-10063.121.3/bsd/man/man2/wait.2 (revision 2c2f96dc2b9a4408a43d3150ae9c105355ca3daa)
1*2c2f96dcSApple OSS Distributions.\"	$NetBSD: wait.2,v 1.6 1995/02/27 12:39:37 cgd Exp $
2*2c2f96dcSApple OSS Distributions.\"
3*2c2f96dcSApple OSS Distributions.\" Copyright (c) 1980, 1991, 1993, 1994
4*2c2f96dcSApple OSS Distributions.\"	The Regents of the University of California.  All rights reserved.
5*2c2f96dcSApple OSS Distributions.\"
6*2c2f96dcSApple OSS Distributions.\" Redistribution and use in source and binary forms, with or without
7*2c2f96dcSApple OSS Distributions.\" modification, are permitted provided that the following conditions
8*2c2f96dcSApple OSS Distributions.\" are met:
9*2c2f96dcSApple OSS Distributions.\" 1. Redistributions of source code must retain the above copyright
10*2c2f96dcSApple OSS Distributions.\"    notice, this list of conditions and the following disclaimer.
11*2c2f96dcSApple OSS Distributions.\" 2. Redistributions in binary form must reproduce the above copyright
12*2c2f96dcSApple OSS Distributions.\"    notice, this list of conditions and the following disclaimer in the
13*2c2f96dcSApple OSS Distributions.\"    documentation and/or other materials provided with the distribution.
14*2c2f96dcSApple OSS Distributions.\" 3. All advertising materials mentioning features or use of this software
15*2c2f96dcSApple OSS Distributions.\"    must display the following acknowledgement:
16*2c2f96dcSApple OSS Distributions.\"	This product includes software developed by the University of
17*2c2f96dcSApple OSS Distributions.\"	California, Berkeley and its contributors.
18*2c2f96dcSApple OSS Distributions.\" 4. Neither the name of the University nor the names of its contributors
19*2c2f96dcSApple OSS Distributions.\"    may be used to endorse or promote products derived from this software
20*2c2f96dcSApple OSS Distributions.\"    without specific prior written permission.
21*2c2f96dcSApple OSS Distributions.\"
22*2c2f96dcSApple OSS Distributions.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23*2c2f96dcSApple OSS Distributions.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24*2c2f96dcSApple OSS Distributions.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25*2c2f96dcSApple OSS Distributions.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26*2c2f96dcSApple OSS Distributions.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27*2c2f96dcSApple OSS Distributions.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28*2c2f96dcSApple OSS Distributions.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29*2c2f96dcSApple OSS Distributions.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30*2c2f96dcSApple OSS Distributions.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31*2c2f96dcSApple OSS Distributions.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32*2c2f96dcSApple OSS Distributions.\" SUCH DAMAGE.
33*2c2f96dcSApple OSS Distributions.\"
34*2c2f96dcSApple OSS Distributions.\"     @(#)wait.2	8.2 (Berkeley) 4/19/94
35*2c2f96dcSApple OSS Distributions.\"
36*2c2f96dcSApple OSS Distributions.Dd April 19, 1994
37*2c2f96dcSApple OSS Distributions.Dt WAIT 2
38*2c2f96dcSApple OSS Distributions.Os BSD 4
39*2c2f96dcSApple OSS Distributions.Sh NAME
40*2c2f96dcSApple OSS Distributions.Nm wait ,
41*2c2f96dcSApple OSS Distributions.Nm wait3 ,
42*2c2f96dcSApple OSS Distributions.Nm wait4 ,
43*2c2f96dcSApple OSS Distributions.Nm waitpid
44*2c2f96dcSApple OSS Distributions.Nd wait for process termination
45*2c2f96dcSApple OSS Distributions.Sh SYNOPSIS
46*2c2f96dcSApple OSS Distributions.Fd #include <sys/wait.h>
47*2c2f96dcSApple OSS Distributions.Ft pid_t
48*2c2f96dcSApple OSS Distributions.Fo wait
49*2c2f96dcSApple OSS Distributions.Fa "int *stat_loc"
50*2c2f96dcSApple OSS Distributions.Fc
51*2c2f96dcSApple OSS Distributions.Ft pid_t
52*2c2f96dcSApple OSS Distributions.Fo wait3
53*2c2f96dcSApple OSS Distributions.Fa "int *stat_loc"
54*2c2f96dcSApple OSS Distributions.Fa "int options"
55*2c2f96dcSApple OSS Distributions.Fa "struct rusage *rusage"
56*2c2f96dcSApple OSS Distributions.Fc
57*2c2f96dcSApple OSS Distributions.Ft pid_t
58*2c2f96dcSApple OSS Distributions.Fo wait4
59*2c2f96dcSApple OSS Distributions.Fa "pid_t pid"
60*2c2f96dcSApple OSS Distributions.Fa "int *stat_loc"
61*2c2f96dcSApple OSS Distributions.Fa "int options"
62*2c2f96dcSApple OSS Distributions.Fa "struct rusage *rusage"
63*2c2f96dcSApple OSS Distributions.Fc
64*2c2f96dcSApple OSS Distributions.Ft pid_t
65*2c2f96dcSApple OSS Distributions.Fo waitpid
66*2c2f96dcSApple OSS Distributions.Fa "pid_t pid"
67*2c2f96dcSApple OSS Distributions.Fa "int *stat_loc"
68*2c2f96dcSApple OSS Distributions.Fa "int options"
69*2c2f96dcSApple OSS Distributions.Fc
70*2c2f96dcSApple OSS Distributions.Sh DESCRIPTION
71*2c2f96dcSApple OSS DistributionsThe
72*2c2f96dcSApple OSS Distributions.Fn wait
73*2c2f96dcSApple OSS Distributionsfunction suspends execution of its calling process until
74*2c2f96dcSApple OSS Distributions.Fa stat_loc
75*2c2f96dcSApple OSS Distributionsinformation is available for a terminated child process,
76*2c2f96dcSApple OSS Distributionsor a signal is received.
77*2c2f96dcSApple OSS DistributionsOn return from a successful
78*2c2f96dcSApple OSS Distributions.Fn wait
79*2c2f96dcSApple OSS Distributionscall,
80*2c2f96dcSApple OSS Distributionsthe
81*2c2f96dcSApple OSS Distributions.Fa stat_loc
82*2c2f96dcSApple OSS Distributionsarea contains termination information about the process that exited
83*2c2f96dcSApple OSS Distributionsas defined below.
84*2c2f96dcSApple OSS Distributions.Pp
85*2c2f96dcSApple OSS DistributionsThe
86*2c2f96dcSApple OSS Distributions.Fn wait4
87*2c2f96dcSApple OSS Distributionscall provides a more general interface for programs
88*2c2f96dcSApple OSS Distributionsthat need to wait for certain child processes,
89*2c2f96dcSApple OSS Distributionsthat need resource utilization statistics accumulated by child processes,
90*2c2f96dcSApple OSS Distributionsor that require options.
91*2c2f96dcSApple OSS DistributionsThe other wait functions are implemented using
92*2c2f96dcSApple OSS Distributions.Fn wait4 .
93*2c2f96dcSApple OSS Distributions.Pp
94*2c2f96dcSApple OSS DistributionsThe
95*2c2f96dcSApple OSS Distributions.Fa pid
96*2c2f96dcSApple OSS Distributionsparameter specifies the set of child processes for which to wait.
97*2c2f96dcSApple OSS DistributionsIf
98*2c2f96dcSApple OSS Distributions.Fa pid
99*2c2f96dcSApple OSS Distributionsis -1, the call waits for any child process.
100*2c2f96dcSApple OSS DistributionsIf
101*2c2f96dcSApple OSS Distributions.Fa pid
102*2c2f96dcSApple OSS Distributionsis 0,
103*2c2f96dcSApple OSS Distributionsthe call waits for any child process in the process group of the caller.
104*2c2f96dcSApple OSS DistributionsIf
105*2c2f96dcSApple OSS Distributions.Fa pid
106*2c2f96dcSApple OSS Distributionsis greater than zero, the call waits for the process with process id
107*2c2f96dcSApple OSS Distributions.Fa pid .
108*2c2f96dcSApple OSS DistributionsIf
109*2c2f96dcSApple OSS Distributions.Fa pid
110*2c2f96dcSApple OSS Distributionsis less than -1, the call waits for any process whose process group id
111*2c2f96dcSApple OSS Distributionsequals the absolute value of
112*2c2f96dcSApple OSS Distributions.Fa pid .
113*2c2f96dcSApple OSS Distributions.Pp
114*2c2f96dcSApple OSS DistributionsThe
115*2c2f96dcSApple OSS Distributions.Fa stat_loc
116*2c2f96dcSApple OSS Distributionsparameter is defined below.  The
117*2c2f96dcSApple OSS Distributions.Fa options
118*2c2f96dcSApple OSS Distributionsparameter contains the bitwise OR of any of the following options.
119*2c2f96dcSApple OSS DistributionsThe
120*2c2f96dcSApple OSS Distributions.Dv WNOHANG
121*2c2f96dcSApple OSS Distributionsoption
122*2c2f96dcSApple OSS Distributionsis used to indicate that the call should not block if
123*2c2f96dcSApple OSS Distributionsthere are no processes that wish to report status.
124*2c2f96dcSApple OSS DistributionsIf the
125*2c2f96dcSApple OSS Distributions.Dv WUNTRACED
126*2c2f96dcSApple OSS Distributionsoption is set,
127*2c2f96dcSApple OSS Distributionschildren of the current process that are stopped
128*2c2f96dcSApple OSS Distributionsdue to a
129*2c2f96dcSApple OSS Distributions.Dv SIGTTIN , SIGTTOU , SIGTSTP ,
130*2c2f96dcSApple OSS Distributionsor
131*2c2f96dcSApple OSS Distributions.Dv SIGSTOP
132*2c2f96dcSApple OSS Distributionssignal also have
133*2c2f96dcSApple OSS Distributionstheir status reported.
134*2c2f96dcSApple OSS Distributions.Pp
135*2c2f96dcSApple OSS DistributionsIf
136*2c2f96dcSApple OSS Distributions.Fa rusage
137*2c2f96dcSApple OSS Distributionsis non-zero, a summary of the resources used by the terminated
138*2c2f96dcSApple OSS Distributionsprocess and all its
139*2c2f96dcSApple OSS Distributionschildren is returned (this information is currently not available
140*2c2f96dcSApple OSS Distributionsfor stopped processes).
141*2c2f96dcSApple OSS Distributions.Pp
142*2c2f96dcSApple OSS DistributionsWhen the
143*2c2f96dcSApple OSS Distributions.Dv WNOHANG
144*2c2f96dcSApple OSS Distributionsoption is specified and no processes
145*2c2f96dcSApple OSS Distributionswish to report status,
146*2c2f96dcSApple OSS Distributions.Fn wait4
147*2c2f96dcSApple OSS Distributionsreturns a
148*2c2f96dcSApple OSS Distributionsprocess id
149*2c2f96dcSApple OSS Distributionsof 0.
150*2c2f96dcSApple OSS Distributions.Pp
151*2c2f96dcSApple OSS DistributionsThe
152*2c2f96dcSApple OSS Distributions.Fn waitpid
153*2c2f96dcSApple OSS Distributionscall is identical to
154*2c2f96dcSApple OSS Distributions.Fn wait4
155*2c2f96dcSApple OSS Distributionswith an
156*2c2f96dcSApple OSS Distributions.Fa rusage
157*2c2f96dcSApple OSS Distributionsvalue of zero.
158*2c2f96dcSApple OSS DistributionsThe older
159*2c2f96dcSApple OSS Distributions.Fn wait3
160*2c2f96dcSApple OSS Distributionscall is the same as
161*2c2f96dcSApple OSS Distributions.Fn wait4
162*2c2f96dcSApple OSS Distributionswith a
163*2c2f96dcSApple OSS Distributions.Fa pid
164*2c2f96dcSApple OSS Distributionsvalue of -1.
165*2c2f96dcSApple OSS Distributions.Pp
166*2c2f96dcSApple OSS DistributionsThe following macros may be used to test the manner of exit of the process.
167*2c2f96dcSApple OSS DistributionsOne of the first three macros will evaluate to a non-zero (true) value:
168*2c2f96dcSApple OSS Distributions.Bl -tag -width Ds
169*2c2f96dcSApple OSS Distributions.It Fn WIFEXITED status
170*2c2f96dcSApple OSS DistributionsTrue if the process terminated normally by a call to
171*2c2f96dcSApple OSS Distributions.Xr _exit 2
172*2c2f96dcSApple OSS Distributionsor
173*2c2f96dcSApple OSS Distributions.Xr exit 3 .
174*2c2f96dcSApple OSS Distributions.It Fn WIFSIGNALED status
175*2c2f96dcSApple OSS DistributionsTrue if the process terminated due to receipt of a signal.
176*2c2f96dcSApple OSS Distributions.It Fn WIFSTOPPED status
177*2c2f96dcSApple OSS DistributionsTrue if the process has not terminated, but has stopped and can be restarted.
178*2c2f96dcSApple OSS DistributionsThis macro can be true only if the wait call specified the
179*2c2f96dcSApple OSS Distributions.Dv WUNTRACED
180*2c2f96dcSApple OSS Distributionsoption
181*2c2f96dcSApple OSS Distributionsor if the child process is being traced (see
182*2c2f96dcSApple OSS Distributions.Xr ptrace 2 ) .
183*2c2f96dcSApple OSS Distributions.El
184*2c2f96dcSApple OSS Distributions.Pp
185*2c2f96dcSApple OSS DistributionsDepending on the values of those macros, the following macros
186*2c2f96dcSApple OSS Distributionsproduce the remaining status information about the child process:
187*2c2f96dcSApple OSS Distributions.Bl -tag -width Ds
188*2c2f96dcSApple OSS Distributions.It Fn WEXITSTATUS status
189*2c2f96dcSApple OSS DistributionsIf
190*2c2f96dcSApple OSS Distributions.Fn WIFEXITED status
191*2c2f96dcSApple OSS Distributionsis true, evaluates to the low-order 8 bits
192*2c2f96dcSApple OSS Distributionsof the argument passed to
193*2c2f96dcSApple OSS Distributions.Xr _exit 2
194*2c2f96dcSApple OSS Distributionsor
195*2c2f96dcSApple OSS Distributions.Xr exit 3
196*2c2f96dcSApple OSS Distributionsby the child.
197*2c2f96dcSApple OSS Distributions.It Fn WTERMSIG status
198*2c2f96dcSApple OSS DistributionsIf
199*2c2f96dcSApple OSS Distributions.Fn WIFSIGNALED status
200*2c2f96dcSApple OSS Distributionsis true, evaluates to the number of the signal
201*2c2f96dcSApple OSS Distributionsthat caused the termination of the process.
202*2c2f96dcSApple OSS Distributions.It Fn WCOREDUMP status
203*2c2f96dcSApple OSS DistributionsIf
204*2c2f96dcSApple OSS Distributions.Fn WIFSIGNALED status
205*2c2f96dcSApple OSS Distributionsis true, evaluates as true if the termination
206*2c2f96dcSApple OSS Distributionsof the process was accompanied by the creation of a core file
207*2c2f96dcSApple OSS Distributionscontaining an image of the process when the signal was received.
208*2c2f96dcSApple OSS Distributions.It Fn WSTOPSIG status
209*2c2f96dcSApple OSS DistributionsIf
210*2c2f96dcSApple OSS Distributions.Fn WIFSTOPPED status
211*2c2f96dcSApple OSS Distributionsis true, evaluates to the number of the signal
212*2c2f96dcSApple OSS Distributionsthat caused the process to stop.
213*2c2f96dcSApple OSS Distributions.El
214*2c2f96dcSApple OSS Distributions.Sh NOTES
215*2c2f96dcSApple OSS DistributionsSee
216*2c2f96dcSApple OSS Distributions.Xr sigaction 2
217*2c2f96dcSApple OSS Distributionsfor a list of termination signals.
218*2c2f96dcSApple OSS DistributionsA status of 0 indicates normal termination.
219*2c2f96dcSApple OSS Distributions.Pp
220*2c2f96dcSApple OSS DistributionsIf a parent process terminates without
221*2c2f96dcSApple OSS Distributionswaiting for all of its child processes to terminate,
222*2c2f96dcSApple OSS Distributionsthe remaining child processes are assigned the parent
223*2c2f96dcSApple OSS Distributionsprocess 1 ID (the init process ID).
224*2c2f96dcSApple OSS Distributions.Pp
225*2c2f96dcSApple OSS DistributionsIf a signal is caught while any of the
226*2c2f96dcSApple OSS Distributions.Fn wait
227*2c2f96dcSApple OSS Distributionscalls is pending,
228*2c2f96dcSApple OSS Distributionsthe call may be interrupted or restarted when the signal-catching routine
229*2c2f96dcSApple OSS Distributionsreturns,
230*2c2f96dcSApple OSS Distributionsdepending on the options in effect for the signal;
231*2c2f96dcSApple OSS Distributionssee
232*2c2f96dcSApple OSS Distributions.Xr intro 2 ,
233*2c2f96dcSApple OSS DistributionsSystem call restart.
234*2c2f96dcSApple OSS Distributions.Sh RETURN VALUES
235*2c2f96dcSApple OSS DistributionsIf
236*2c2f96dcSApple OSS Distributions.Fn wait
237*2c2f96dcSApple OSS Distributionsreturns due to a stopped
238*2c2f96dcSApple OSS Distributionsor terminated child process, the process ID of the child
239*2c2f96dcSApple OSS Distributionsis returned to the calling process.  Otherwise, a value of -1
240*2c2f96dcSApple OSS Distributionsis returned and
241*2c2f96dcSApple OSS Distributions.Va errno
242*2c2f96dcSApple OSS Distributionsis set to indicate the error.
243*2c2f96dcSApple OSS Distributions.Pp
244*2c2f96dcSApple OSS DistributionsIf
245*2c2f96dcSApple OSS Distributions.Fn wait3 ,
246*2c2f96dcSApple OSS Distributions.Fn wait4 ,
247*2c2f96dcSApple OSS Distributionsor
248*2c2f96dcSApple OSS Distributions.Fn waitpid
249*2c2f96dcSApple OSS Distributionsreturns due to a stopped
250*2c2f96dcSApple OSS Distributionsor terminated child process, the process ID of the child
251*2c2f96dcSApple OSS Distributionsis returned to the calling process.
252*2c2f96dcSApple OSS DistributionsIf there are no children not previously awaited,
253*2c2f96dcSApple OSS Distributions-1 is returned with
254*2c2f96dcSApple OSS Distributions.Va errno
255*2c2f96dcSApple OSS Distributionsset to
256*2c2f96dcSApple OSS Distributions.Bq Er ECHILD .
257*2c2f96dcSApple OSS DistributionsOtherwise, if
258*2c2f96dcSApple OSS Distributions.Dv WNOHANG
259*2c2f96dcSApple OSS Distributionsis specified and there are
260*2c2f96dcSApple OSS Distributionsno stopped or exited children,
261*2c2f96dcSApple OSS Distributions0 is returned.
262*2c2f96dcSApple OSS DistributionsIf an error is detected or a caught signal aborts the call,
263*2c2f96dcSApple OSS Distributionsa value of -1
264*2c2f96dcSApple OSS Distributionsis returned and
265*2c2f96dcSApple OSS Distributions.Va errno
266*2c2f96dcSApple OSS Distributionsis set to indicate the error.
267*2c2f96dcSApple OSS Distributions.Sh ERRORS
268*2c2f96dcSApple OSS DistributionsThe
269*2c2f96dcSApple OSS Distributions.Fn wait
270*2c2f96dcSApple OSS Distributionssystem call will fail and return immediately if:
271*2c2f96dcSApple OSS Distributions.Bl -tag -width Er
272*2c2f96dcSApple OSS Distributions.\" ===========
273*2c2f96dcSApple OSS Distributions.It Bq Er ECHILD
274*2c2f96dcSApple OSS DistributionsThe calling process has no existing unwaited-for child processes.
275*2c2f96dcSApple OSS Distributions.\" ===========
276*2c2f96dcSApple OSS Distributions.It Bq Er EFAULT
277*2c2f96dcSApple OSS DistributionsThe
278*2c2f96dcSApple OSS Distributions.Fa status
279*2c2f96dcSApple OSS Distributionsor
280*2c2f96dcSApple OSS Distributions.Fa rusage
281*2c2f96dcSApple OSS Distributionsargument points to an illegal address
282*2c2f96dcSApple OSS Distributions(may not be detected before the exit of a child process).
283*2c2f96dcSApple OSS Distributions.\" ===========
284*2c2f96dcSApple OSS Distributions.It Bq Er EINVAL
285*2c2f96dcSApple OSS DistributionsInvalid or undefined flags are passed in the
286*2c2f96dcSApple OSS Distributions.Fa options
287*2c2f96dcSApple OSS Distributionsargument.
288*2c2f96dcSApple OSS Distributions.El
289*2c2f96dcSApple OSS Distributions.Pp
290*2c2f96dcSApple OSS DistributionsThe
291*2c2f96dcSApple OSS Distributions.Fn wait3
292*2c2f96dcSApple OSS Distributionsand
293*2c2f96dcSApple OSS Distributions.Fn waitpid
294*2c2f96dcSApple OSS Distributionscalls will fail and return immediately if:
295*2c2f96dcSApple OSS Distributions.Bl -tag -width Er
296*2c2f96dcSApple OSS Distributions.\" ===========
297*2c2f96dcSApple OSS Distributions.It Bq Er ECHILD
298*2c2f96dcSApple OSS DistributionsThe process specified by
299*2c2f96dcSApple OSS Distributions.Fa pid
300*2c2f96dcSApple OSS Distributionsdoes not exist or is not a child of the calling process,
301*2c2f96dcSApple OSS Distributionsor the process group specified by
302*2c2f96dcSApple OSS Distributions.Fa pid
303*2c2f96dcSApple OSS Distributionsdoes not exist or does not have any member process
304*2c2f96dcSApple OSS Distributionsthat is a child of the calling process.
305*2c2f96dcSApple OSS Distributions.El
306*2c2f96dcSApple OSS Distributions.Pp
307*2c2f96dcSApple OSS DistributionsThe
308*2c2f96dcSApple OSS Distributions.Fn waitpid
309*2c2f96dcSApple OSS Distributionscall will fail and return immediately if:
310*2c2f96dcSApple OSS Distributions.Bl -tag -width Er
311*2c2f96dcSApple OSS Distributions.\" ===========
312*2c2f96dcSApple OSS Distributions.It Bq Er EINVAL
313*2c2f96dcSApple OSS DistributionsThe options argument is not valid.
314*2c2f96dcSApple OSS Distributions.El
315*2c2f96dcSApple OSS Distributions.Pp
316*2c2f96dcSApple OSS DistributionsAny of these calls will fail and return immediately if:
317*2c2f96dcSApple OSS Distributions.Bl -tag -width Er
318*2c2f96dcSApple OSS Distributions.\" ===========
319*2c2f96dcSApple OSS Distributions.It Bq Er EINTR
320*2c2f96dcSApple OSS DistributionsThe call is interrupted by a caught signal
321*2c2f96dcSApple OSS Distributionsor the signal does not have the
322*2c2f96dcSApple OSS Distributions.Dv SA_RESTART
323*2c2f96dcSApple OSS Distributionsflag set.
324*2c2f96dcSApple OSS Distributions.El
325*2c2f96dcSApple OSS Distributions.Sh STANDARDS
326*2c2f96dcSApple OSS DistributionsThe
327*2c2f96dcSApple OSS Distributions.Fn wait
328*2c2f96dcSApple OSS Distributionsand
329*2c2f96dcSApple OSS Distributions.Fn waitpid
330*2c2f96dcSApple OSS Distributionsfunctions are defined by POSIX;
331*2c2f96dcSApple OSS Distributions.Fn wait3
332*2c2f96dcSApple OSS Distributionsand
333*2c2f96dcSApple OSS Distributions.Fn wait4
334*2c2f96dcSApple OSS Distributionsare not specified by POSIX.
335*2c2f96dcSApple OSS DistributionsThe
336*2c2f96dcSApple OSS Distributions.Fn WCOREDUMP
337*2c2f96dcSApple OSS Distributionsmacro
338*2c2f96dcSApple OSS Distributionsand the ability to restart a pending
339*2c2f96dcSApple OSS Distributions.Fn wait
340*2c2f96dcSApple OSS Distributionscall are extensions to the POSIX interface.
341*2c2f96dcSApple OSS Distributions.Sh LEGACY SYNOPSIS
342*2c2f96dcSApple OSS Distributions.Fd #include <sys/types.h>
343*2c2f96dcSApple OSS Distributions.Fd #include <sys/wait.h>
344*2c2f96dcSApple OSS Distributions.Pp
345*2c2f96dcSApple OSS DistributionsThe include file
346*2c2f96dcSApple OSS Distributions.In sys/types.h
347*2c2f96dcSApple OSS Distributionsis necessary.
348*2c2f96dcSApple OSS Distributions.Sh SEE ALSO
349*2c2f96dcSApple OSS Distributions.Xr sigaction 2 ,
350*2c2f96dcSApple OSS Distributions.Xr exit 3 ,
351*2c2f96dcSApple OSS Distributions.Xr compat 5
352*2c2f96dcSApple OSS Distributions.Sh HISTORY
353*2c2f96dcSApple OSS DistributionsA
354*2c2f96dcSApple OSS Distributions.Fn wait
355*2c2f96dcSApple OSS Distributionsfunction call appeared in
356*2c2f96dcSApple OSS Distributions.At v6 .
357