httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <sor...@gmail.com>
Subject Re: post-config phase question
Date Tue, 10 Nov 2009 22:45:53 GMT
On Tue, Nov 10, 2009 at 23:40, Michael Durket
<durket@highwire.stanford.edu> wrote:
> Based on the few books that describe Apache module writing and a presentation
> that I've found on the web from an Apache conference, the advice to module
> writers is to remember that Apache calls the post-config phase twice - once
> while it's checking its configuration files, and then when it's ready to start up
> it discards all that and calls post-config again to really set things up.
>
> But it appears to me (via tracing I've done in my own module) that post-config
> is actually called once at configuration file checking time, and then once per
> server process start (we're using MPM here) during the second (actual Apache
> startup phase).
>
> Is this correct?

No. It's done twice, before forking the children. The post_configs run
as the user who launched apache (typically root), before the sever
switches to the user/group specified in the corresponding
configuration directives.

Have a look in server/main.c in the sources of apache.

Sorin

Mime
View raw message