about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2019-03-27 18:57:40 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2019-04-10 20:56:53 +0100
commit5e11082349bf72897f93f3a4493a97a2caf15984 (patch)
tree0f04a37505090dace6dcee7775abd6ec0dcf1f25 /Src
parent5c165453ab1d0a91a0b7a5c8493bafddad4eaab2 (diff)
downloadzsh-5e11082349bf72897f93f3a4493a97a2caf15984.tar.gz
zsh-5e11082349bf72897f93f3a4493a97a2caf15984.tar.xz
zsh-5e11082349bf72897f93f3a4493a97a2caf15984.zip
44168 (tweaked to remove change to errflag): Fix interrupt handling of zle -F.
If interrupted by irrelevant interrupt (EINTR only is set), don't set
the local error flag, just retry.
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index d54e928a6..d3b9aeab8 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -632,7 +632,11 @@ raw_getbyte(long do_keytmout, char *cptr, int full)
 	     * with all fds, then try unsetting the special ones.
 	     */
 	    if (selret < 0 && !errtry) {
-		errtry = 1;
+		/* Continue after irrelevant interrupt */
+		if (errno != EINTR) {
+		    /* Don't trust special FDs */
+		    errtry = 1;
+		}
 		continue;
 	    }
 	    if (selret == 0) {