1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-16 09:01:25 +01:00

34403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTY

This commit is contained in:
Barton E. Schaefer 2015-01-26 18:47:29 -08:00
parent cae0be3af6
commit 5751de7975
2 changed files with 7 additions and 2 deletions

View file

@ -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__)
/*