1#!/bin/sh 2# $FreeBSD$ 3 4base=`basename $0` 5 6echo "1..2" 7 8name="pkill -g <pgrp>" 9pgrp=`ps -o tpgid -p $$ | tail -1` 10sleep=$(pwd)/sleep.txt 11ln -sf /bin/sleep $sleep 12$sleep 5 & 13sleep 0.3 14pkill -f -g $pgrp $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 -g 0" 27sleep=$(pwd)/sleep.txt 28ln -sf /bin/sleep $sleep 29$sleep 5 & 30sleep 0.3 31pkill -f -g 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