about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-06-02 10:59:51 +0100
committerPeter Stephenson <pws@zsh.org>2016-06-02 11:01:39 +0100
commit8cf68f05ab1b13f147521ad64df34dae256e09fb (patch)
tree2cff97abdfed6f01df2777b71768ef45006e031f /Src/utils.c
parent770500d69db0cf9dcee6ed62455aa79a38ed182e (diff)
downloadzsh-8cf68f05ab1b13f147521ad64df34dae256e09fb.tar.gz
zsh-8cf68f05ab1b13f147521ad64df34dae256e09fb.tar.xz
zsh-8cf68f05ab1b13f147521ad64df34dae256e09fb.zip
21603: Make read_poll more interruptible.
If we interrupted the first read we still did the fallback read.
This is wrong.
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 12911d3f4..95be1fb98 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2534,7 +2534,7 @@ read_poll(int fd, int *readchar, int polltty, zlong microseconds)
 #endif
 #endif
 
-    if (fd >= 0 && ret < 0) {
+    if (fd >= 0 && ret < 0 && !errflag) {
 	/*
 	 * Final attempt: set non-blocking read and try to read a character.
 	 * Praise Bill, this works under Cygwin (nothing else seems to).