axl163 has asked for the wisdom of the Perl Monks concerning the following question:
If fork() is the answer, would this be the type of structure I would use (as recommended by Roy Johnson)?for (my $x = 0; $x < $total_number_runs ; $x++) { exec("shell_script < input_file"); }
Any advice would be greatly appreciated. Thanks,for my $x (1..$total_number_of_runs) { my $pid = fork; if (not defined $pid) { die("Unable to create child process: $!\n"); } exec("shell_script < $input_file"); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Is fork() my answer to using dual-cpu?
by samtregar (Abbot) on Oct 25, 2005 at 18:52 UTC | |
by radiantmatrix (Parson) on Oct 25, 2005 at 19:28 UTC | |
by idsfa (Vicar) on Oct 25, 2005 at 19:47 UTC | |
by radiantmatrix (Parson) on Oct 26, 2005 at 18:58 UTC | |
Re: Is fork() my answer to using dual-cpu?
by Roy Johnson (Monsignor) on Oct 25, 2005 at 18:35 UTC | |
by bluto (Curate) on Oct 25, 2005 at 19:12 UTC | |
Re: Is fork() my answer to using dual-cpu?
by duckyd (Hermit) on Oct 25, 2005 at 18:35 UTC | |
Re: Is fork() my answer to using dual-cpu?
by salva (Canon) on Oct 26, 2005 at 20:42 UTC |