xref: /freebsd/bin/pkill/tests/pkill-_f_test.sh (revision ccfd87fe2ac0e2e6aeb1911a7d7cce6712a8564f)
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