in reply to Forking and running all child processes at the same time
for my $file ( <*.log> ) { # for example... defined( my $pid = fork ) or die "Unable to fork: $!"; unless ( $pid ) { # in child # process $file exit; } } 1 while wait > 0; # avoid zombies
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Forking and running all child processes at the same time
by jimbojones (Friar) on Jun 06, 2005 at 14:34 UTC |