diff options
Diffstat (limited to 'tools/regression/usr.bin/pkill/pgrep-F.t')
-rw-r--r-- | tools/regression/usr.bin/pkill/pgrep-F.t | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/regression/usr.bin/pkill/pgrep-F.t b/tools/regression/usr.bin/pkill/pgrep-F.t index a4c1c6c..b9d844c 100644 --- a/tools/regression/usr.bin/pkill/pgrep-F.t +++ b/tools/regression/usr.bin/pkill/pgrep-F.t @@ -9,16 +9,15 @@ name="pgrep -F <pidfile>" pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep -$sleep 5 & +daemon -p $pidfile $sleep 5 sleep 0.3 -chpid=$! -echo $chpid > $pidfile +chpid=`cat $pidfile` pid=`pgrep -f -F $pidfile $sleep` if [ "$pid" = "$chpid" ]; then echo "ok - $name" else echo "not ok - $name" fi -kill $chpid +kill "$chpid" rm -f $pidfile rm -f $sleep |