Forking w/ mod_perl 2

2003-09-12 Thread Cameron B. Prince
Hi all, I have a report creation perl script that takes about 15 minutes to run and I need to fork it. I tried the code from v1: use strict; use POSIX 'setsid'; use Apache::SubProcess; my = shift; -send_http_header(text/plain); {CHLD} = 'IGNORE'; defined (my = fork) or die

RE: Forking w/ mod_perl 2

2003-09-12 Thread Cameron B. Prince
$command; CORE::exit(0); } This seems to work and no zombies are floating around. But I've not been able to restart Apache while the forked program is running yet to see if it's killed. More comments or ideas welcome. Thanks, Cameron 2c On Fri, 2003-09-12 at 14:40, Cameron B

mod_perl v2 Forking

2003-09-12 Thread Cameron B. Prince
Hi all... Sorry about the previous message getting screwed up... Not sure what happened... I have a report generator program written in Perl that I need to start from a CGI. The program takes about 15 minutes to run, so I must fork or double fork. I have two goals: 1) Have no zombies when the

RE: templating system opinions

2003-07-21 Thread Cameron B. Prince
Just wondering what the best templating system is to use and/or learn. Hi, I'm just wondering why no one recommended Embperl. Like Mason, it's more than a templating system, but I find it's inheritance features great. I'm using it for a personal project and haven't really checked it's

RE: templating system opinions

2003-07-20 Thread Cameron B. Prince
Just wondering what the best templating system is to use and/or learn. Hi, I'm just wondering why no one recommended Embperl. Like Mason, it's more than a templating system, but I find it's inheritance features great. I'm using it for a personal project and haven't really checked it's

IPC Open

2003-07-18 Thread Cameron B. Prince
Hi, I have the following subroutine in a package that's called by an embperl page via mod_perl: sub MP3Check { my ($self,$params) = @_; use IPC::Open3; my ($pid,%values); $SIG{ALRM} = sub { my $kill = kill -9 $pid; system($kill); $values{'CHECK_PROBLEM'} = 1;

IPC::Run

2003-07-18 Thread Cameron B. Prince
Hi Barrie, I dug out an old note from you and started trying IPC::Run. Here's what I have so far: sub MP3Check { my ($self,$params) = @_; use IPC::Run qw( run timeout ); my @command = ( $self-{MP3Check}, qq! -v $params-{file}! ); run [EMAIL PROTECTED], \undef, \my