9 tty=`ps -x -o tty -p $$ | tail -1`
10 if [ "$tty" = "??" -o "$tty" = "-" ]; then
15 pts/*) ttyshort=`echo $tty | cut -c 5-` ;;
16 *) ttyshort=`echo $tty | cut -c 4-` ;;
19 sleep=$(pwd)/sleep.txt
20 ln -sf /bin/sleep $sleep
24 pid=`pgrep -f -t $tty $sleep`
25 if [ "$pid" = "$chpid" ]; then
28 echo "not ok 1 - $name"
30 pid=`pgrep -f -t $ttyshort $sleep`
31 if [ "$pid" = "$chpid" ]; then
34 echo "not ok 2 - $name"