From adcda09cbc21f754ede4ab57a47be46ebf9a08ee Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 4 Jan 2010 10:59:14 +0000 Subject: [PATCH] Catch up with UNIX98-style PTY's. --- tools/regression/usr.bin/pkill/pgrep-t.t | 5 ++++- tools/regression/usr.bin/pkill/pkill-t.t | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/regression/usr.bin/pkill/pgrep-t.t b/tools/regression/usr.bin/pkill/pgrep-t.t index 7e81ada7568..04f0e122e0b 100644 --- a/tools/regression/usr.bin/pkill/pgrep-t.t +++ b/tools/regression/usr.bin/pkill/pgrep-t.t @@ -11,7 +11,10 @@ if [ "$tty" = "??" ]; then tty="-" ttyshort="-" else - ttyshort=`echo $tty | cut -c 4-` + case $tty in + pts/*) ttyshort=`echo $tty | cut -c 5-` ;; + *) ttyshort=`echo $tty | cut -c 4-` ;; + esac fi sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep diff --git a/tools/regression/usr.bin/pkill/pkill-t.t b/tools/regression/usr.bin/pkill/pkill-t.t index cbef527cd50..76c4f280dae 100644 --- a/tools/regression/usr.bin/pkill/pkill-t.t +++ b/tools/regression/usr.bin/pkill/pkill-t.t @@ -11,7 +11,10 @@ if [ "$tty" = "??" ]; then tty="-" ttyshort="-" else - ttyshort=`echo $tty | cut -c 4-` + case $tty in + pts/*) ttyshort=`echo $tty | cut -c 5-` ;; + *) ttyshort=`echo $tty | cut -c 4-` ;; + esac fi sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep