Wait for each specified process to complete and return its termination status.

      wait [n ...] 

   n   A process ID or a job specification

Each n may be a process ID or a job specification; if a job specification is given, all processes in that job’s pipeline are waited for.

If n is not given, all currently active child processes are waited for, and the return status is zero.

If n specifies a non-existent process or job, the return status is 127. Otherwise, the return status is the exit status of the last process or job waited for.

This is a BASH shell builtin, to display your local syntax from the bash prompt type: help wait


Wait for process #2585:

$ wait 2585

“If you wait to do everything until you're sure it’s right, you’ll probably never do much of anything” ~ Win Borden

Related macOS commands

ps - Process status.
lsof - List open files.
Equivalent Windows command: WAITFOR - Wait for or send a signal.

Copyright © 1999-2024 SS64.com
Some rights reserved