arkamedis21 has asked for the wisdom of the Perl Monks concerning the following question:
for (my $i=0; $i < 10; $i++) { $pid = fork; if ($pid == 0) { my $dir_cmd = "dir"; my @output = `$dir_cmd`; exit 1; } elsif ( defined ($pid) ) { # parent $process_count++; push(@pids,$pid); print "job $pid forked \n"; } else { # fork error print "fork failed with code $pid n"; exit 1; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
forking in Windows is not what you may think
by Rex(Wrecks) (Curate) on Apr 25, 2002 at 15:56 UTC | |
|
Re: forking in winblows ?
by dhable (Monk) on Apr 25, 2002 at 16:05 UTC | |
by Rex(Wrecks) (Curate) on Apr 25, 2002 at 16:59 UTC | |
by arkamedis21 (Acolyte) on Apr 25, 2002 at 16:31 UTC | |
by Mr. Muskrat (Canon) on Apr 25, 2002 at 16:52 UTC | |
by graff (Chancellor) on Apr 26, 2002 at 05:52 UTC | |
|
Re: forking in winblows ?
by rbc (Curate) on Apr 25, 2002 at 16:27 UTC | |
by arkamedis21 (Acolyte) on Apr 25, 2002 at 16:34 UTC |