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