xref: /freebsd/bin/pkill/tests/pkill-i_test.sh (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1#!/bin/sh
2
3base=`basename $0`
4
5echo "1..1"
6
7name="pkill -i"
8sleep=$(pwd)/sleep.txt
9usleep="${sleep}XXX"
10touch $usleep
11lsleep="${sleep}xxx"
12ln -sf /bin/sleep $usleep
13$usleep 5 &
14sleep 0.3
15pkill -f -i $lsleep
16ec=$?
17case $ec in
180)
19	echo "ok - $name"
20	;;
21*)
22	echo "not ok - $name"
23	;;
24esac
25rm -f $sleep $usleep
26