From: Stas Bekman [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 11:14 PM
My last post included a patch providing the mechanism to know when the server starts and immediately restarts. Unfortunately it won't work for 'httpd -k [stop|graceful|restart]' which can't reach the pool of the running server.
We have users asking for a flag which will allow them to disable the execution of their startup code when the server is shutdown. Can the mpm architecture be extended to set some flag telling what state it's in (for the benefit of the config phase and may be others as well)?
Now this would be useful. Especially since I don't want all the initialization (with all the potential failures during) when I'm trying to shut down the server. Ever had a config error when trying to shut down your server?
Config error is a trivial issue. It's a much bigger issue with running code at the startup, which is not supposed to be run.
I thought that this and my previous post's patch could be combined into one API. So we could have the following states:
state httpd.conf parsed # of times --------------------------------------- prestart first time start second time graceful first time restart first time stop first time
the first two states are the normal startup, phases. As you can see from this table, the state gives a better state mapping, rather then the currently used init_if_first_time.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com