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