Is there anything a mod_perl2 child_init phase can do to call attention
to a problem?

I moved a block of code from a post_config handler to a new child_init
handler, without thinking much about the niceties of the move.  The
code contained a couple of 'die' statements, which I trust would
prevent an Apache startup if executed in a post config handler.

Q1: WOULD 'DIE' IN A POST_CONFIG HANDLER ABORT AN
APACHE2 STARTUP?

In the child_init handler, an executed 'die' did nothing noticeable.
Specifically the message did not end up in the error_log.  In the
mod_perl2 doc pages, child_init is described as being 'of type void',
which another page says means that the return value doesn't matter.

I will change the 'die' to a '$s->log_error', and return the nastiest-
sounding Apache return code I can find, in hopes that some future
Apache might notice it.

Q2:  IS THERE ANYTHING A CHILD_INIT PHASE CAN DO TO
ABORT ITS CHILD PROCESS, AND THUS CALL ATTENTION
TO A SERIOUS PROBLEM?

It's amusing that the 'child_init' process seems to be an orphan
in the Apache2 world...

Thanks in advance,
cmac
www.animalhead.com

Reply via email to