Removed zebra_search_rpn. Updated a few tests
[idzebra-moved-to-github.git] / test / gils / stop02.sh
index 996feeb..4a60a66 100755 (executable)
@@ -1,4 +1,6 @@
-# test02.sh - test start and stop of the server with -S
+#!/bin/sh
+# $Id: stop02.sh,v 1.3 2003-05-06 20:09:28 adam Exp $
+# test start and stop of the server with -S
 #
 # FIXME - this test does not currently pass  (H 22-oct-2002)
 # Something rotten with signals and threads and mutexes...
@@ -23,14 +25,14 @@ sleep 1
 echo "  checking that it runs... "
 test -f zebrasrv.pid || exit 1
 PID=`cat zebrasrv.pid`
-ps -p $PID >/dev/null || exit 1
+ps -p $PID |grep $PID >/dev/null || exit 1
 
 echo "  connecting to it..."
 ../testclient localhost:9901 utah > log || exit 1
 sleep 1
 
 echo "  checking that it still runs..."
-ps -p $PID >/dev/null || exit 1
+ps -p $PID | grep $PID >/dev/null || exit 1
 
 echo "  connecting again, with a delay..."
 ../testclient -d 5 localhost:9901 utah > log &
@@ -39,9 +41,9 @@ sleep 1 # let the client connect
 echo "  killing it..."
 kill  $PID
 
+sleep 1
 echo "  checking that it is dead..."
-ps -p $PID >/dev/null && exit 1
+ps -p $PID | grep $PID >/dev/null && exit 1
 
-echo ok
 # clean up
 rm -rf reg idx.log srv.log zebrasrv.pid