perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: PerlChildInitHandler => s/VOID/RUN_ALL/
Date Thu, 08 Sep 2005 00:23:33 GMT

> It doesn't work in Child(Init|Exit) phases. Not only it doesn't exit, it
> doesn't even log the error. See the test in my patch. Add die in
> child_init() and you will see.

ok, that's problematic - anyplace you call die() from perl-land ought to
show up in the logs.  the current behavior is bad (tm).

but if by exit you mean stop server startup, are you sure that's possible
within the confines of httpd?  in prefork you might get no children ever
available to receive requests, but I'm not sure that you could make
apachectl return an error.  are you?


> The fact that httpd ignores the child_init() return value is a problem
> that needs to be fixed.

ok.  and we can theoretically not ignore it in mod_perl-land.  but what do
we do from it?  we can issue croaks all day, but can we make httpd startup
stop within the child_init() callback currently?

> 
>>> The only problem I have is how to prevent from Apache to continue on
>>> failure. Any ideas?
>>
>>
>>
>> I'm not sure that it makes sense to halt apache on failure in these
>> phases.
>>  you want to shut httpd down if a PerlChildExitHandler fails?  these
>> aren't
>> part of startup processing so I don't see how they could prevent
>> apache from
>>  starting.
> 
> 
> While I somewhat agree about ChildExit, but not about ChildInit. I'm not
> talking hypotethically. I want to use ChildInit for efficiency reasons,
> and sometimes things fail, and I have no way to prevent the server from
> happily starting.

ok, but that's a httpd issue, not a mod_perl one, right?  again, unless
httpd gives us a mechanism to halt the startup process it's kinda out of our
hands.  unless you're saying httpd has a formal mechanism in place we can
use.  if it doesn't I'd say we either need to offer a patch to httpd and
make things right going forward, or live with what httpd gives us.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message