httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: rewritten apachectl
Date Mon, 25 Aug 1997 14:41:09 GMT
On Mon, 25 Aug 1997, Martin Kraemer wrote:

> Marc wrote,...
> > 
> > Feedback appreciated.  
> > 
> 
> I have two problems here on SVR4:
> 
> 1)  > /var/tmp/apachectl
>     /var/tmp/apachectl: test: Argument erwartet
>     Exit 1
> 
>     > sh -x !$
>     sh -x /var/tmp/apachectl
>     PIDFILE=/usr/local/etc/httpd/logs/httpd.pid
>     HTTPD=/home/marcs/archive/apache/apachen/src/httpd
>     LYNX=lynx -dump
>     STATUSURL=http://localhost/server-status
>     ERROR=0
>     + [ ! ]
>     /var/tmp/apachectl: test: Argument erwartet
>     Exit 1
> 
>     [ ! "$@"] doesn't work when no args are given (because "$@" --when
>     no arguments are there-- is not "", but really -nothing-. Here,
>     it might be preferable to use "$*" (and -z instead of !):
>     Could you change the test to something like
> 	if [ -z "$*" ]; then
>     or
> 	if [ $# -eq 0 ]; then
>     This change should make it run on all "standard unixes".

That's the old version.  The new one changes that somewhat.  I'm still not
happy with it, but it may work.

> 
> 2)  > !$ status
>     /var/tmp/apachectl status
>     Gebrauch: ps [ -edalfcj ] [ -r sysname ] [ -t termlist ]
> 	    [ -u uidlist ] [ -p proclist ] [ -g grplist ] [ -s sidlist ]
> 	   ...
> 
>     On SVR4, we have a SYSV'ish /usr/bin/ps program (and a Berkeley'ish
>     /usr/ucb/ps). The (standard) ps program needs a "-p" in front of
>     the PID. I wonder how this could be made tranparent for all *nixes.

By getting rid of SVR4?  Shucks, guess that doesn't work.

does kill -0 work right?

ie.

sleep 1000 &
kill -0 <pid>
echo $?         # should be 0
ps -p <pid>     # should still be there
kill <pid>   
kill -0 <pid>  
echo $?         # should be 1


Mime
View raw message