Do you have a particular need to execute the 16 processes in parallel? If not, use system.
for (0..16) { my $idx = $_ || ''; # Don't actually include '0' in the file name. my $in_file = "perloutput$idx.txt"; my $out_file = "output$idx.txt"; my $rv = system("chirp_md5sum $in_file > $out_file"); die("Error launching child: $!\n") if $rv == -1; die(sprintf("Child died with signal %d\n", $rv & 127))if $rv & 127; die(sprintf("Child returned error %d\n, $rv >> 8)) if $rv; }
In reply to Re: Fork and wait question
by ikegami
in thread Fork and wait question
by chris68805
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |