perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2] callback returning bogus error code don't log the error
Date Sat, 11 Dec 2004 03:36:17 GMT
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
> 
>> Stas Bekman wrote:
>>
>>> [...] This brings us to a more painful problem. the code in startup.pl:
>>>
>>>   $s->push_handlers(PerlPostConfigHandler => sub { 12345 });
>>>
>>> won't let the server start, and no error is logged, the server just
>>> quits.
> 
> 
> Actually, you'll get this in the error_log:
> 
> Configuration Failed
> 
> it's from [httpd]/server/main.c:
> 
>    if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) {
>        ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
>                     0, NULL, "Unable to open logs\n");
>        destroy_and_exit_process(process, 1);
>    }
> 
>    if ( ap_run_post_config(pconf, plog, ptemp, server_conf) != OK) {
>        ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
>                     NULL, "Configuration Failed\n");
>        destroy_and_exit_process(process, 1);
>    }
> 
> 
>> but this is a problem. I can't figure out why the server fails (won't 
>> start here). I think for post_config phase it absolutely wants a valid 
>> OK or another return code. Philippe, please take a look at the apache 
>> source code. I think the answer will be there.
> 
> 
> See above!

But it gives no clue whatsoever where did it fail.

I think we need to make a special case for open_logs and post_config 
phases in modperl_callback and require OK or log a proper error.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Mime
View raw message