Use wait instead of waitpid. Wait returns when any child exits. Waitpid waits for a particular child.
Also see Running commands in parallel.
<cite>Just a tongue-tied, twisted, earth-bound misfit. -- Pink Floyd</cite>
In reply to Re: Launching multiple commands in parallel
by data64
in thread Launching multiple commands in parallel
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |