httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Marantz <>
Subject Forcing Apache to exit on startup
Date Mon, 22 Oct 2012 19:29:33 GMT

Our module has multiple confirmation parameters.  There is a case where if
you have option A and option B, then you must also specify option C,
otherwise Bad things can happen that are a lot easier to debug on startup
than they are after the server is running.

I know how to force 'apachectl' to exit with a nice error message if I
don't like the value of option A or option B.  I can do that in the
function-pointer I provide in my option-table by returning a non-null char*

But in this case I want to exit nicely from the function I have registered
with ap_hook_child_init, having noticed that option A and B are set but not
C.  Is that possible?

By "nicely", I mean that the user types:

% sudo /etc/init.d/apachectl restart
Error in pagespeed.conf: if you have option A and B specified, you must
specify a value for option C.

At that point either the server would not be running, or it would still be
in whatever state it was previously in.

Is this possible?

Currently our solution is to log an error and call abort(), and it's not
very nice!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message