I'm having trouble with running an external program. It seems to work the
first few times I do it, then it gets stuck and I have to restart httpd
with kill -9. I've tried things a few different ways. Here is what I'm
currently doing:
my $pm = new Parallel::ForkManager(6);
for my $thing_to_do(@things) {
# Forks and returns the pid for the child:
my $pid = $pm->start and next;
my $command=q{/public_html/perl/detach.pl};
$command . ' ' . $thing_to_do;
`$command`;
### I've also tried: $r->spawn_proc_prog ($fc); ###
$pm->finish; # Terminates the child process
}
$pm->wait_all_children;
I'm sure this is "simple". Where have I gone wrong?
--
*Ryan Perry*
Technology Director
RestoreHealth
1289 Deming Way
Madison, WI 53717
608.833.7046 ext 700
[email protected]