pkill-s_test.sh revision 143880
1#!/bin/sh 2# $FreeBSD: head/tools/regression/usr.bin/pkill/pkill-s.t 143880 2005-03-20 12:38:08Z pjd $ 3 4base=`basename $0` 5 6echo "1..2" 7 8name="pkill -s <sid>" 9sid=`ps -o tsid -p $$ | tail -1` 10sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 11ln -sf /bin/sleep $sleep 12$sleep 5 & 13sleep 0.3 14pkill -f -s $sid $sleep 15ec=$? 16case $ec in 170) 18 echo "ok 1 - $name" 19 ;; 20*) 21 echo "not ok 1 - $name" 22 ;; 23esac 24rm -f $sleep 25 26name="pkill -s 0" 27sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 28ln -sf /bin/sleep $sleep 29$sleep 5 & 30sleep 0.3 31pkill -f -s 0 $sleep 32ec=$? 33case $ec in 340) 35 echo "ok 2 - $name" 36 ;; 37*) 38 echo "not ok 2 - $name" 39 ;; 40esac 41rm -f $sleep 42