]> arthur.barton.de Git - ngircd.git/commitdiff
- die ermittelte PID des ngIRCd wird besser validiert (leer?).
authorAlexander Barton <alex@barton.de>
Fri, 20 Sep 2002 13:55:51 +0000 (13:55 +0000)
committerAlexander Barton <alex@barton.de>
Fri, 20 Sep 2002 13:55:51 +0000 (13:55 +0000)
src/testsuite/start-server.sh
src/testsuite/stop-server.sh

index 3c9f1bccfece848831832d064b750fd001ace8f1..2cf6280e67ea5ebe1ecd5261df9e6c7e8ccb38c0 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: start-server.sh,v 1.5.2.1 2002/09/20 13:46:22 alex Exp $
+# $Id: start-server.sh,v 1.5.2.2 2002/09/20 13:55:51 alex Exp $
 
 echo "      starting server ..."
 
@@ -17,6 +17,6 @@ if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
 
 ps $PS_FLAGS > procs.tmp
 pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
-kill -0 $pid > /dev/null 2>&1
+[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
 
 # -eof-
index e9acbb31baa276b320a1e50046892defc4e69a48..ac9540d0f13e459a51489274cf6e5c145949bed2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: stop-server.sh,v 1.4.2.1 2002/09/20 13:46:22 alex Exp $
+# $Id: stop-server.sh,v 1.4.2.2 2002/09/20 13:55:51 alex Exp $
 
 echo "      stopping server ..."
 
@@ -10,6 +10,6 @@ if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
 
 ps $PS_FLAGS > procs.tmp
 pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
-kill $pid > /dev/null 2>&1
+[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
 
 # -eof-