]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Use input-tty rather than testing for /dev/stdin.
authorJim Meyering <jim@meyering.net>
Fri, 19 Jul 2002 21:12:23 +0000 (21:12 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 19 Jul 2002 21:12:23 +0000 (21:12 +0000)
tests/rm/dangling-symlink

index 97cafcaa72a1db1e3d80ff0340e4720a0ea46b88..73cd889c753f6f16893602dd0d70705b228d4f74 100755 (executable)
@@ -7,6 +7,9 @@ if test "$VERBOSE" = yes; then
   rm --version
 fi
 
+# Make sure there's a tty on stdin.
+. $srcdir/../input-tty
+
 pwd=`pwd`
 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
@@ -24,11 +27,7 @@ fi
 
 fail=0
 
-# Skip this test if there is no /dev/stdin file.
-ls /dev/stdin >/dev/null 2>&1 \
-  || { (exit 77); exit; }
-
-rm dangle < /dev/stdin &
+rm dangle &
 pid=$!
 # The buggy rm (fileutils-4.1.9) would hang here, waiting for input.