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

index 8969dcddbc99097c21e8249f5ad05b63c12aeeee..8eef8b47d2390a9d2bb0b27523d56b5fb41f86c8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: start-server.sh,v 1.6 2002/09/18 20:58:56 alex Exp $
+# $Id: start-server.sh,v 1.7 2002/09/20 13:57:01 alex Exp $
 
 echo "      starting server ..."
 
 
 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 }"`
 
 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-
 
 # -eof-
index ee9d9dccfd9c3f319226f9153acb6146aa051b47..0064baf2bf3662b0903f8356452347d327f009c4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: stop-server.sh,v 1.5 2002/09/18 20:58:56 alex Exp $
+# $Id: stop-server.sh,v 1.6 2002/09/20 13:57:01 alex Exp $
 
 echo "      stopping server ..."
 
 
 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 }"`
 
 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-
 
 # -eof-