Hi,
While documenting the 'restart twice on start' apache's behavior, I've
tested $Apache::Server::ReStarting and $Apache::Server::Starting.
<Perl> section is executed twice -- OK.
startup.pl is executed once -- OK.
$Apache::Server::ReStarting never gets set! - I suppose it's a bug.
(I have tried Apache::Server::ReStarting and Apache::ServerReStarting
which is the same... I've even tried Apache::Server::Restarting and
Apache::ServerRestarting - I know they don't exist)
Meanwhile the only workaround is:
ReStarting == true if Starting == false
Here is the test that you can reproduce:
I've added:
httpd.conf:
----------
<Perl>
print STDERR "<Perl> Apache::Server::Starting is true \n" if
$Apache::Server::Starting;
print STDERR "<Perl> Apache::Server::Starting is false \n" unless
$Apache::Server::Starting;
print STDERR "<Perl> Apache::Server::ReStarting is true \n" if
$Apache::Server::ReStarting;
print STDERR "<Perl> Apache::Server::ReStarting is false \n" unless
$Apache::Server::ReStarting;
</Perl>
startup.pl:
-----------
print STDERR "startup.pl: Apache::Server::Starting is true \n" if
$Apache::Server::Starting;
print STDERR "startup.pl: Apache::Server::Starting is false \n" unless
$Apache::Server::Starting;
print STDERR "startup.pl: Apache::Server::ReStarting is true \n" if
$Apache::Server::ReStarting;
print STDERR "startup.pl: Apache::Server::ReStarting is false \n" unless
$Apache::Server::ReStarting;
when server is started
startup.pl: Apache::Server::Starting is true
startup.pl: Apache::Server::ReStarting is false
<Perl> Apache::Server::Starting is true
<Perl> Apache::Server::ReStarting is false
and in the error_log:
<Perl> Apache::Server::Starting is false
<Perl> Apache::Server::ReStarting is false
I'm running the latest CVS (both mod_perl and apache) version on linux
with perl5.00503 if it matters.
BTW, Doug -- a wish list:
I think we need four states:
1. Starting
2. Restarting
3. Running
4. Stopping
I needed the 'Stopping' flag for the runwaway processes watchdog if you
remember. probably other cleanup and alerting features can be added using
the 'stopping' flag.
Regarding implementation -- it can be a single variable, with four states.
Thanks!
_______________________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.org modperl.sourcegarden.org perlmonth.com perl.org
single o-> + single o-+ = singlesheaven http://www.singlesheaven.com