execline
Software
skarnet.org
The wait program
wait waits for a set of children, then executes a program.
Interface
In an execlineb script:
wait [ -I | -i ] [ -r | -t timeout ] { [ pids... ] } prog...
- wait reads a list of pids in a
(possibly empty) block,
and unquotes it.
- wait waits for every child whose pid is
listed in pids.... If pids... is an
empty list, it waits for every child process it has.
- wait then execs into prog....
Options
- -r : equivalent to -t 0. Do not
pause: only reap processes that are already dead when wait
is invoked.
- -t timeout : wait for a maximum
of timeout milliseconds. If there still are living processes
among pids... (or among wait's children if
pids... is an empty list), after timeout
milliseconds, they will not be reaped.
- -I : loose. If wait times out while
waiting for children to die, it will still
exec into prog.... This is the default.
- -i : strict. If wait times out, it
will print an error message and exit 1.
Notes
- For POSIX
compatibility, wait also works when it cannot find a block.
In that case, all its command line is interpreted as pids...
arguments and it does not execute into a program. Instead, it exits
with a conforming exit code.