about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/utils.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5939ea141..a183c5086 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,11 @@
 	* 34387: Src/module.c: Avoid loading the main zsh binary as
 	a module
 
+2015-01-26  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 34403: Src/utils.c: refine 34399 to avoid settyinfo() when the
+	input descriptor is not a TTY
+
 2015-01-26  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 34402: Src/Modules/db_gdbm.c: make unsetting a tied gdbm
diff --git a/Src/utils.c b/Src/utils.c
index d38babbe4..47d99442d 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2300,8 +2300,8 @@ read_poll(int fd, int *readchar, int polltty, zlong microseconds)
     struct ttyinfo ti;
 #endif
 
-     if (fd < 0)
-	 polltty = 0;		/* no tty to poll */
+    if (fd < 0 || (polltty && !isatty(fd)))
+	polltty = 0;		/* no tty to poll */
 
 #if defined(HAS_TIO) && !defined(__CYGWIN__)
     /*