xref: /freebsd/bin/pkill/tests/pkill-_f_test.sh (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1#!/bin/sh
2# $FreeBSD$
3
4base=`basename $0`
5
6echo "1..1"
7
8name="pkill -F <pidfile>"
9pidfile=$(pwd)/pidfile.txt
10sleep=$(pwd)/sleep.txt
11ln -sf /bin/sleep $sleep
12$sleep 5 &
13sleep 0.3
14echo $! > $pidfile
15pkill -f -F $pidfile $sleep
16ec=$?
17case $ec in
180)
19	echo "ok - $name"
20	;;
21*)
22	echo "not ok - $name"
23	;;
24esac
25
26rm -f $pidfile
27rm -f $sleep
28