wait(1) wait(1)
NAME
wait - await completion of process
SYNOPSIS
wait [pid . . .]
DESCRIPTION
Wait for your background processes whose process IDs are the
values of pid and report termination status. Any pid which
represents an unknown process ID is treated as if it were a
known process ID that exited with exit status 127.
If pid is omitted, all your shell's currently active
background processes are waited for.
The shell itself executes wait, without creating a new
process.
EXIT STATUS
wait exits with an exit status determined as follows.
If wait is invoked with one or more pid arguments, and the
processes of all the given pids have terminated or are not
known to the invoking shell, and the status of the last pid is
known, then the exit status is that of the last pid.
If wait terminated abnormally due to the receipt of a signal,
the exit status is greater than 128.
Otherwise, wait exits with one of the following values:
0 wait was invoked with no operands and all process
IDs known by the invoking shell have terminated.
1-126 wait detected an error.
127 The process identified by the last pid operand given
is unknown.
FILES
/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
language-specific message file [See LANG on environ
(5).]
Copyright 1994 Novell, Inc. Page 1
wait(1) wait(1)
REFERENCES
sh(1)
NOTICES
If you get the error message cannot fork, too many processes,
try using the wait command to clean up your background
processes. If this doesn't help, the system process table is
probably full or you have too many active foreground
processes. (There is a limit to the number of process ids
associated with your login, and to the number the system can
keep track of.)
Not all the processes of a 3- or more-stage pipeline are
children of the shell, and thus cannot be waited for.
If pid is not an active process id, wait returns immediately.
Copyright 1994 Novell, Inc. Page 2