httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: How to fail in case of an error
Date Thu, 20 Jun 2013 16:26:55 GMT
On Wed, Jun 19, 2013 at 1:10 PM,  <markus.kopp@nokia.com> wrote:
> Hi,
>
> what is the recommended way for a module to fail the start of Apache, if the module cannot
be started (e.g. due to a configuration problem)?
>

It depends. If you know it has failed in a directive configuration
handler, you can return a char* with an error message. httpd will
print out the error message and exit.

If you only know after parsing all the directives, and trying to
combine them in module_init, you can simply exit(3). At this point,
httpd is performing the initial parsing of httpd.conf, when httpd is
running as a single process and thread.

Cheers

Tom

Mime
View raw message