LinuxCommandLibrary

waitpid

Wait for the termination of arbitrary processes.

TLDR

Sleep until all processes whose PIDs have been specified have exited

$ waitpid [pid1 pid2 ...]
copy


Sleep for at most n seconds
$ waitpid --timeout [n] [pid1 pid2 ...]
copy


Do not error if specified PIDs have already exited
$ waitpid --exited [pid1 pid2 ...]
copy


Sleep until n of the specified processes have exited
$ waitpid --count [n] [pid1 pid2 ...]
copy


Display help
$ waitpid -h
copy

Copied to clipboard