9 tty=`ps -o tty -p $$ | tail -1`
10 if [ "$tty" = "??" ]; then
14 ttyshort=`echo $tty | cut -c 4-`
16 sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
17 ln -sf /bin/sleep $sleep
21 pid=`pgrep -f -t $tty $sleep`
22 if [ "$pid" = "$chpid" ]; then
25 echo "not ok 1 - $name"
27 pid=`pgrep -f -t $ttyshort $sleep`
28 if [ "$pid" = "$chpid" ]; then
31 echo "not ok 2 - $name"