waitpid
Wait for the termination of arbitrary processes. tldr-pages
On Linux
Linux
Sleep until all processes whose PIDs have been specified have exited
waitpid process_id1 process_id2 ...IdentifySleep for at most n seconds
waitpid --timeout n process_id1 process_id2 ...IdentifyDo not error if specified PIDs have already exited
waitpid --exited process_id1 process_id2 ...IdentifySleep until n of the specified processes have exited
waitpid --count n process_id1 process_id2 ...IdentifyDisplay help
waitpid --helpIdentify