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:
parent
cae0be3af6
commit
5751de7975
2 changed files with 7 additions and 2 deletions
|
|
@ -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__)
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue