xref: /csrg-svn/share/man/man1/wait.1 (revision 61575)
1*61575Sbostic.\" Copyright (c) 1991, 1993
2*61575Sbostic.\"	The Regents of the University of California.  All rights reserved.
319542Smckusick.\"
450798Scael.\" %sccs.include.redist.roff%
550068Sbostic.\"
6*61575Sbostic.\"     @(#)wait.1	8.1 (Berkeley) 06/05/93
750068Sbostic.\"
850798Scael.Dd
950798Scael.Dt WAIT 1
1050798Scael.Os
1150798Scael.Sh NAME
1250798Scael.Nm wait
1350798Scael.Nd await process completion
1450798Scael.Sh SYNOPSIS
1550798Scael.Nm wait
1650798Scael.Op Ar pid
1750798Scael.Sh DESCRIPTION
1850798ScaelIf invoked with no arguments, the
1950798Scael.Nm wait
2050798Scaelutility waits until
2150798Scaelall existing child processes in the background
2250798Scaelhave terminated.
2350798Scael.Pp
2450798ScaelAvailable operands:
2550798Scael.Bl -tag -width Ds
2650798Scael.It Ar pid
2750798ScaelIf a
2850798Scael.Ar pid
2950798Scaeloperand is specified, and it is the process ID of a
3050798Scaelbackground child process that still exists, the
3150798Scael.Nm wait
3250798Scaelutility
3350798Scaelwaits until that process has completed and consumes its
3450798Scaelstatus information, without consuming the status information
3550798Scaelof any other process.
3650798Scael.Pp
3750798ScaelIf a pid operand is specified that is not the process ID of
3850798Scaela child background process that still exists,
3950798Scael.Nm wait
4050798Scaelexits
4150798Scaelwithout waiting for any processes to complete.
4250798Scael.El
4350798Scael.Pp
4450798ScaelThe
4550798Scael.Nm wait
4650798Scaelutility exits with one of the following values:
4750798Scael.Bl -tag -width Ds
4850798Scael.It \&0
4950798ScaelThe
5050798Scael.Nm wait
5150798Scaelutility was invoked with no operands and
5250798Scaelall of the existing background child processes have
5350798Scaelterminated, or the process specified by the pid
5450798Scaeloperand exited normally with 0 as its exit status.
5550798Scael.It \&>\&0
5650798ScaelThe specified process did not exist and its exit
5750798Scaelstatus information was not available, or the specified
5850798Scaelprocess existed or its exit status information
5950798Scaelwas available, and it terminated with a non-zero
6050798Scaelexit status.
6150798Scael.El
6250798Scael.Pp
6350798ScaelIf the specified process terminated abnormally due
6450798Scaelto the receipt of a signal, the exit status
6550798Scaelinformation of
6650798Scael.Nm wait
6750798Scaelcontains that termination status as
6850798Scaelwell.
6950798Scael.Sh STANDARDS
7050798ScaelThe
7150798Scael.Nm wait
7250798Scaelcommand is expected to be
7350798Scael.St -p1003.2
7450798Scaelcompatible.
75