diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2019-03-27 18:57:40 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2019-04-10 20:56:53 +0100 |
commit | 5e11082349bf72897f93f3a4493a97a2caf15984 (patch) | |
tree | 0f04a37505090dace6dcee7775abd6ec0dcf1f25 | |
parent | 5c165453ab1d0a91a0b7a5c8493bafddad4eaab2 (diff) | |
download | zsh-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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/Zle/zle_main.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 801d423a5..d0d32063b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,12 @@ * 44158 (tweaked): Completion/Unix/Command/_postgresql: Add completion for PostgreSQL +2019-03-27 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 44168 (tweaked to remove modification to errflag): + Src/Zle/zle_main.c: Ignore bad return if errno EINTR as this is + recoverable. +g 2019-03-25 dana <dana@dana.is> * 44160 (tweaked): Completion/Debian/Command/_apt, 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) { |