summaryrefslogtreecommitdiff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-01-26 18:47:29 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2015-01-26 18:48:25 -0800
commit5751de7975d559dbdf641126589683bd92fad9bc (patch)
tree50243f7bdf6f08db26314a56c407562b6a7b7660 /Src/utils.c
parentcae0be3af69f32eee05028ca2ee0c4b6997171af (diff)
downloadzsh-5751de7975d559dbdf641126589683bd92fad9bc.tar.gz
zsh-5751de7975d559dbdf641126589683bd92fad9bc.zip
34403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTY
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 2 insertions, 2 deletions
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__)
/*