You're lucky already. You didn't see what happens on the same script running
on Win32 Apache2...

----- Original Message ----- 
From: "Ken Perl" <[EMAIL PROTECTED]>
To: <modperl@perl.apache.org>
Sent: Sunday, February 12, 2006 3:02 PM
Subject: detecting server start, stop, graceful in startup.pl


> >From the Apache2::ServerUtil API doc, to do something only when server
> restarts (httpd -k start or httpd -k graceful), check whether
> restart_count() is bigger than 1:
>
>   my $cnt = Apache2::ServerUtil::restart_count();
>   do_something() if $cnt > 1;
>
> However, the API doesn't work as above. I tried to add some debug code
> to my startup.pl script and tried all the command options of
> apache2ctl, start, stop, graceful, the $cnt is always equal 1.
> I also tried to write the value $cnt to a /tmp/out file just like in
> the API doc and got same result, that is
>  % apache2ctl -k start
>   cnt: 1
>   cnt: 2
>
>   % apache2ctl -k graceful
>   cnt: 1
>   cnt: 3
>
>   % apache2ctl -k graceful
>   cnt: 1
>   cnt: 4
>
>   % apache2ctl -k stop
>   cnt: 1
>
> But, I can't detecting start, stop, graceful in startup.pl coding just
> like in the API doc, Could you give me some comments? thanks.
>
> --
> perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"[EMAIL PROTECTED]
> ")'

Reply via email to