Sander Temme wrote: > on 10/22/01 9:17 PM, Stas Bekman at [EMAIL PROTECTED] wrote: > > >>Either httpd returns a wrong status here (too early?): >> >>if $HTTPD ; then >> echo "$0 $ARG: httpd started" >> >>or may be an additional check for pid file should be done and report >>success/failure only then? >> > > Apachectl basically never looks back. I posted a small patch a while ago > that waits for a couple of seconds after starting httpd and then checks the > presence of the pid file, but it wasn't picked up.
In fact the problem happens with 'apachectl restart' too. I use: apachectl stop; sleep 3; apachectl start; instead. I do this since 'apachectl restart' reports restarted when it didn't, because the stop wasn't fast enough. This usually happens when the server is not stopping very fast (dynamic processes). I wish apachectl was more useful. Or at least won't report things it's not sure about. In the perl test framework (Apache::Test) used by httpd-2.0 test suite we ping the server (by fetching a static page or simply /) before reporting that it has started and keep on pinging for a few seconds until ping responds or the failure is reported. I don't see why this approach cannot be applied to apachectl. _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
