But wait doesn't support flags and will therefore pend until a child exits. So if you want to do something in the meantime, forget it -- you have to wait until at least one of your children is done. The way we used to do this in C was to keep track of our children's PIDs, then waitpid across the set without pending to reap any that were done. We'd work that into whatever processing we wanted to do while the children were running.
I haven't done the same thing in Perl though so there may be a better way. Threads are another excellent model for doing this sort of thing but I haven't used them in Perl.
In reply to Re: Re: Launching multiple commands in parallel
by steves
in thread Launching multiple commands in parallel
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |