httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: perl-framework: mod_dav but not mod_dav?
Date Tue, 04 Dec 2001 13:01:46 GMT
Rodent of Unusual Size wrote:

> Stas Bekman wrote:
> 
>>Rodent of Unusual Size wrote:
>>
>>
>>>BTW, this caused t/TEST to keep trying to start the server
>>>for a minute.  Maybe an 'httpd -t' should be done first
>>>and bail immediately on failure?  It would short-circuit the
>>>minute of waiting when we can *tell* it's not going to
>>>start..
>>>
>>you cannot test with -t, e.g. if I say:
>>
>>PerlModule DoesntExist
>>
>>it'll say:
>>
>>% /home/stas/httpd/prefork/bin/httpd -t -d
>>/home/stas/apache.org/modperl-2.0/t -f
>>/home/stas/apache.org/modperl-2.0/t/conf/httpd.conf -DAPACHE2
>>-DPERL_USEITHREADS
>>Syntax OK
>>
> 
> But 'PerlModule DoesntExist' isn't a *syntax* failure.
> It's a dependency failure detected at runtime.  So -t
> won't catch everything, no -- but it *will* catch some.


that's right, I was thinking globally.


>>tell me how can we programmatically learn that the start-up
>>has failed, without waiting for the pid file to appear
>>
> 
> For run-time dependency failures such as you cite above, there
> isn't any way (currently).  However, if there's a startup
> failure we *can* detect, why not do so?


Are there any plans to add such a feature?

Actually, we don't have to run -t to test for failure, since the normal 
execution fails as well and for all cases (not only syntax errors). The 
problem is that we run:

   system "command &";

so we cannot get the return status, after shell detaches the process. So 
may be forking and running system() without & +detaching the process is 
what we want. The childs can communicate to the parent its failure via 
SIGCHLD, which will abort the server. Doug?

Also I'm not sure what happens with the winXX case.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message