GNU bug report logs - #16940
[PATCH] tests: Do not access /dev/tty if it does not exist

Previous Next

Package: coreutils;

Reported by: Cyril Roelandt <tipecaml <at> gmail.com>

Date: Wed, 5 Mar 2014 03:42:01 UTC

Severity: normal

Tags: fixed, patch

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Cyril Roelandt <tipecaml <at> gmail.com>
To: 16940 <at> debbugs.gnu.org
Cc: Cyril Roelandt <tipecaml <at> gmail.com>
Subject: bug#16940: [PATCH] tests: Do not access /dev/tty if it does not exist
Date: Wed,  5 Mar 2014 04:34:47 +0100
* tests/misc/nohup.sh: Do not try to access /dev/tty if it does not exist. This
  happens on GNU Guix, for instance.
---
 tests/misc/nohup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
index 6d2b515..e331eab 100755
--- a/tests/misc/nohup.sh
+++ b/tests/misc/nohup.sh
@@ -61,7 +61,7 @@ rm -f nohup.out err
 
 # Bug present through coreutils 8.0: failure to print advisory message
 # to stderr must be fatal.  Requires stdout to be terminal.
-if test -w /dev/full && test -c /dev/full; then
+if test -w /dev/full && test -c /dev/full && test -f /dev/tty; then
 (
   exec >/dev/tty
   test -t 1 || exit 0
-- 
1.9.0





This bug report was last modified 6 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.