]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/pkill/tests/pkill-_f_test.sh
ssh: Update to OpenSSH 9.5p1
[FreeBSD/FreeBSD.git] / bin / pkill / tests / pkill-_f_test.sh
1 #!/bin/sh
2
3 base=`basename $0`
4
5 echo "1..1"
6
7 name="pkill -F <pidfile>"
8 pidfile=$(pwd)/pidfile.txt
9 sleep=$(pwd)/sleep.txt
10 ln -sf /bin/sleep $sleep
11 $sleep 5 &
12 sleep 0.3
13 echo $! > $pidfile
14 pkill -f -F $pidfile $sleep
15 ec=$?
16 case $ec in
17 0)
18         echo "ok - $name"
19         ;;
20 *)
21         echo "not ok - $name"
22         ;;
23 esac
24
25 rm -f $pidfile
26 rm -f $sleep