From 5751de7975d559dbdf641126589683bd92fad9bc Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Mon, 26 Jan 2015 18:47:29 -0800 Subject: 34403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTY --- Src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src') 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__) /* -- cgit 1.4.1