external process

Ryan Perry <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CAByX2tjokhvstTQryOWHz-F08ZuwR8FG0rJS8BS16R8Xh1Pm6g@mail.gmail.com>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.