commands.sh

waitpid

linux

Wait for the termination of arbitrary processes. See also: `wait`.

More info →

Options (4)

-t, --timeoutboolean

Sleep for at most `n` seconds

Example: waitpid {{[-t|--timeout]}} {{n}} {{pid1 pid2 ...}}
-e, --exitedboolean

Do not error if specified PIDs have already exited

Example: waitpid {{[-e|--exited]}} {{pid1 pid2 ...}}
-c, --countboolean

Sleep until `n` of the specified processes have exited

Example: waitpid {{[-c|--count]}} {{n}} {{pid1 pid2 ...}}
-h, --helpboolean

Display help

Example: waitpid {{[-h|--help]}}

Examples (5)

Sleep until all processes whose PIDs have been specified have exited

waitpid pid1 pid2 ...

Sleep for at most `n` seconds

waitpid [-t|--timeout] n pid1 pid2 ...

Do not error if specified PIDs have already exited

waitpid [-e|--exited] pid1 pid2 ...

Sleep until `n` of the specified processes have exited

waitpid [-c|--count] n pid1 pid2 ...

Display help

waitpid [-h|--help]
made by @shridhargupta | data from tldr-pages