waitwait for process to complete |
KornShell Built-in |
wait [pid|job-id...]
wait waits for the termination of one or more jobs or
child processes in the background. If you specify job-ids,
wait waits for all processes in each job to terminate.
If you specify a pid, wait waits for the
child process with that process ID to terminate. If no child process has that
process ID, wait returns immediately.
If you specify neither a pid nor a job-id,
wait waits for the termination of all process IDs known
to the invoking shell.
0Successful completion.
1-126An error occurred.
127A specified pid or job-id has terminated or is unknown by the invoking shell.
sleep