You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian <br...@mtu.net> on 2001/12/03 04:16:21 UTC
Forking problem with mod_perl...
I'm writing a script that will run under mod_perl. Right now, if I
disable mod_perl the script runs fine. When I turn mod_perl back on, it
stops working. Here's the lowdown.
Basically I'm writing a program that will take a users email address and
their password, and make an attempt to figure out what mail server they
use to check their mail. To speed things up, I'm forking off a process
for each possible server. So, if your email address is foo@bar.com,
then my script would try the servers:
foo.com
mail.foo.com
pPop.foo.com
pop3.foo.com
And so on. Each attempt would be a new fork. Now, what is happening is
$SIG{CHLD} is being completely ignored with mod_perl on. And it's
driving me nutty trying to figure out why. I've declared it as a
package variable, I've declared it as a local variable, and nothing
seems to work. Does anybody have any idea why SIG{CHLD} would be
ignored under mod_perl?
Brian Johnson
Programmer/Systems Administrator
Source1Results.com
http://www.source1results.com
Online Marketing Management and Solutions
Re: Forking problem with mod_perl...
Posted by "Brett W. McCoy" <bm...@chapelperilous.net>.
On Sun, 2 Dec 2001, Brian wrote:
> I'm writing a script that will run under mod_perl. Right now, if I
> disable mod_perl the script runs fine. When I turn mod_perl back on, it
> stops working. Here's the lowdown.
Forking under mod_perl isn't a good idea. Did you read this?
http://perl.apache.org/guide/performance.html#Forking_and_Executing_Subprocess
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
America may be unique in being a country which has leapt from barbarism
to decadence without touching civilization.
-- John O'Hara