httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: read_config()
Date Mon, 22 Jul 1996 21:06:14 GMT
Robert S. Thau wrote:
>   Why are there two calls to read_config()?
> As with the "multiple config files" question, this comes up often
> enough to merit inclusion in a FAQ someplace... on the other hand, it
> generally comes up in a slightly different form (the most common
> being, "why is my module's init routine called twice?").
> What's going on is that the server calls read_config():
>   *) At startup, to determine whether it is running under inetd
>   *) Every time it begins standalone operations, either on intial
>      startup or on a signal-triggered restart.  
> The second call could be avoided on initial entry to standalone_main(),
> of course --- but it would complicate the code a bit to do so.  A more
> subtle point is that with that second call in place, it becomes much
> harder to write a module which can't handle a restart, since it has 
> to handle the implicit restart on entry to standalone_main() in order
> to work at all.

As a matter of small interest, the Apache-SSL patch removes the redundant
call (otherwise you have to enter your pass phrase twice).

> Since SIGHUP survival testing isn't necessarily the first (or
> fiftieth) thing on peoples' minds when they're writing these things, I
> suspect a lot of people wouldn't bother at all unless something came
> along to force the issue.  Since this question is most often asked by
> people whose code, as it turns out, is failing because of the second
> call (and which therefore wouldn't, in fact, function correctly on a
> signal-triggered restart), this bit of fortuitous torture testing may
> in fact have improved at least some of the modules out there...

This is a good point. I have wondered whether Apache-SSL should refuse to
reload certs on a restart (it is a bit hard to get to type in the pass phrase
second time around anyway).



> rst

Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email:
A.L. Digital Ltd,           URL:
London, England.            Apache Group member (

View raw message