dgaudet     98/06/25 12:14:47

  Modified:    src      CHANGES
               src/support apachectl
  Log:
  use kill -0 $PID
  
  Revision  Changes    Path
  1.931     +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.930
  retrieving revision 1.931
  diff -u -r1.930 -r1.931
  --- CHANGES   1998/06/23 23:41:11     1.930
  +++ CHANGES   1998/06/25 19:14:40     1.931
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.1
   
  +  *) PORT: Change support/apachectl to use "kill -0 $pid" to test if the
  +     httpd is running.  This should be more portable than figuring out
  +     which of three dozen different versions of "ps" are installed.
  +     [a cast of dozens]
  +
     *) Win32: If we can't figure out how to execute a file in a script
        directory, bail out of the request with an error message.  [W G 
Stoddard]
   
  
  
  
  1.8       +4 -5      apache-1.3/src/support/apachectl
  
  Index: apachectl
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/support/apachectl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apachectl 1998/06/10 12:08:51     1.7
  +++ apachectl 1998/06/25 19:14:44     1.8
  @@ -50,13 +50,12 @@
       # check for pidfile
       if [ -f $PIDFILE ] ; then
        PID=`cat $PIDFILE`
  -     PS=`ps -p $PID 2>/dev/null | tail -1 | grep $PID`
  -     if [ "x$PS" = "x" ]; then
  -         STATUS="httpd (pid $PID?) not running"
  -         RUNNING=0
  -     else
  +     if kill -0 $PID; then
            STATUS="httpd (pid $PID) running"
            RUNNING=1
  +     else
  +         STATUS="httpd (pid $PID?) not running"
  +         RUNNING=0
        fi
       else
        STATUS="httpd (no pid file) not running"
  
  
  

Reply via email to