Hi all,

First of all sorry if this is not really mod_perl related

I'm looking for the best way to start a new process from a (SetHandler modperl) PerlResponseHandler. I don't want the ResponseHandler to wait for the new process. So the new process needs to be completely independent. The new process will be doing lots of database queries, and put the results in a queue (mysql), were it can be read by the next apropriate request from the user.

I'm thinking about doing this like :
system("path/to/newprocess.pl data > /dev/null >2>&1 &");

Tests with a newprocess.pl script that only does "sleep(300)" seems to act like suspected. The PerlResponseHandler doesn't wait for it, so that's ok. It are no child processes, that's also ok. But when I restart Apache, these new processes all dissappear, and this means they are not really independent.

The questions:
Is this the best way of doing this ?
Can/will this have a negative effect on mod_perl and/or the perfomance of mod_perl ?


Thanks for your time,
Regards,
Stef


-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to