www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: apache-api/4667: ap_init_modules gets called twice.
Date Wed, 30 Jun 1999 05:20:00 GMT
The following reply was made to PR apache-api/4667; it has been noted by GNATS.

From: Marc Slemko <marcs@znep.com>
To: Joachim Marder <marder@pobox.com>
Cc: Apache bugs database <apbugs@apache.org>
Subject: Re: apache-api/4667: ap_init_modules gets called twice.
Date: Tue, 29 Jun 1999 22:13:33 -0700 (PDT)

 On Tue, 29 Jun 1999, Joachim Marder wrote:
 
 > Hi.
 > 
 > > Synopsis: ap_init_modules gets called twice.
 > > 
 > > State-Changed-From-To: open-closed
 > > State-Changed-By: marc
 > > State-Changed-When: Mon Jun 28 13:49:07 PDT 1999
 > > State-Changed-Why:
 > > It is that way on purpose.  While it could possibly be
 > > changed now for various reasons, for backwards compatibility
 > > state the double init remains.
 > > 
 > > Your module needs to be able to handle having the init
 > > function called multiple times anyway, since it happens at
 > > HUP/USR1.
 > 
 > Sorry, but I don't know what you mean with HUP/USR1. Could
 > you please clarify this?
 
 When you send a SIGHUP to the server, all the init functions are called
 again.
 
 > The problem is that ap_get_module_config returns different
 > pointers in the two init calls, so I cannot see if I already
 > have initilized my stuff. What happens to the first config
 > struct and the data I filled in??? If I lock a file or for
 
 You need to read up on how pools work.
 
 > off a process I have a problem if init gets called a second
 > time and the config struct is empty again.
 
 You need to register the appropriate cleanup functions in the appropriate
 pools so that anything you do can be automatically cleaned up when the
 pool is destroyed.
 
 > 
 > Best regards,
 > 
 > Joachim Marder
 > 
 > 
 

Mime
View raw message