Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (v - z) wait(1)
NAME
wait - Reports termination status of processes
SYNOPSIS
wait [job]
DESCRIPTION
The wait command waits for the specied job and reports its termination status. If job is not
given, all currently active child processes are waited for. The exit status from this command is
that of the process waited for. (See Jobs for a description of the format of job.)
EXIT VALUES
If a specied job is not known, wait returns an exit status of 127. If wait is invoked with no
arguments and all process IDs known by the invoking shell have terminated, wait returns an exit
status of 0 (zero). If wait detects an error, it returns an exit status in the range 1-126.
NOTES
The wait command is a shell built-in command. It differs from the regular commands in that it
does not open a new shell process when it executes.
A general discussion of shell built-in commands and a list of the OSS shell built-in commands
are in the reference page for sh(1).
RELATED INFORMATION
Commands: sh(1).
527188-004 Hewlett-Packard Company 1023