httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: Module init called twice?
Date Fri, 05 Dec 1997 04:35:16 GMT
On Thu, 4 Dec 1997, Igor Tatarinov wrote:

> Dean Gaudet wrote:
> > 
> > This is just how it is ... and always has been.  Well ok, I tried to get
> > rid of it, and so have others, but reasons for keeping it always come back
> > to haunt us.  You have to be able to handle multiple calls in order to do
> > restarts properly anyhow.
> 
> I see. But I don't understand why init_modules() has to be called in
> main. It will be called in standalone_main() anyway!
> 
> Same about read_server_config().
>
> Why can't they be removed from main()? 

$ httpd -d/some/path

Excerpt from /some/path/httpd.conf:

ServerRoot /some/other/path

This is perfectly legal. But the server has already made configuration
decisions based on "/some/path". So Apache starts up, reads config files,
then shuts down, and forgets everything except the configuration details,
and does it all again. This had been determined to be the "best" way of
doing things.

And as has been mentioned already, a module should be able to handle
restarts, as many of them in close proximity as the server can (and Apache
can handle quite a lot in a short amount of time). So having Apache start
and stop and start again at startup ensures that module authors don't
screw this up.

-- Alexei Kosut <akosut@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Mime
View raw message