xref: /freebsd/bin/pkill/tests/pkill-_p_test.sh (revision 822057bfbbbcdb722a7ccd0e40d6b7e82b1d83f7)
1*822057bfSKyle Evans#!/bin/sh
2*822057bfSKyle Evans# $FreeBSD$
3*822057bfSKyle Evans
4*822057bfSKyle Evansbase=`basename $0`
5*822057bfSKyle Evans
6*822057bfSKyle Evansecho "1..1"
7*822057bfSKyle Evans
8*822057bfSKyle Evansname="pkill -P <ppid>"
9*822057bfSKyle Evansppid=$$
10*822057bfSKyle Evanssleep=$(pwd)/sleep.txt
11*822057bfSKyle Evansln -sf /bin/sleep $sleep
12*822057bfSKyle Evans$sleep 5 &
13*822057bfSKyle Evanssleep 0.3
14*822057bfSKyle Evanspkill -f -P $ppid $sleep
15*822057bfSKyle Evansec=$?
16*822057bfSKyle Evanscase $ec in
17*822057bfSKyle Evans0)
18*822057bfSKyle Evans	echo "ok - $name"
19*822057bfSKyle Evans	;;
20*822057bfSKyle Evans*)
21*822057bfSKyle Evans	echo "not ok - $name"
22*822057bfSKyle Evans	;;
23*822057bfSKyle Evansesac
24*822057bfSKyle Evans
25*822057bfSKyle Evansrm -f $sleep
26