diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2015-01-26 18:47:29 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-01-26 18:48:25 -0800 |
commit | 5751de7975d559dbdf641126589683bd92fad9bc (patch) | |
tree | 50243f7bdf6f08db26314a56c407562b6a7b7660 /Src | |
parent | cae0be3af69f32eee05028ca2ee0c4b6997171af (diff) | |
download | zsh-5751de7975d559dbdf641126589683bd92fad9bc.tar.gz zsh-5751de7975d559dbdf641126589683bd92fad9bc.tar.xz zsh-5751de7975d559dbdf641126589683bd92fad9bc.zip |
34403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTY
Diffstat (limited to 'Src')
-rw-r--r-- | Src/utils.c | 4 |
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__) /* |