Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Ctrl-c not working during correction with 5.1
- X-seq: zsh-workers 36376
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Ctrl-c not working during correction with 5.1
- Date: Tue, 1 Sep 2015 11:15:02 -0700
- In-reply-to: <20150901141031.GB423@x4>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150901141031.GB423@x4>
On Sep 1, 4:10pm, Markus Trippelsdorf wrote:
}
} I cannot abort a correction with Ctrl-c anymore, e.g.:
}
} markus@x4 tmp % la
} zsh: correct 'la' to 'lz' [nyae]? <press Ctrl-c and nothing happens>
Unintended side-effect of all the race-condition-prevention work that
went on this summer.
diff --git a/Src/utils.c b/Src/utils.c
index 4c4dc55..90f7c33 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2538,11 +2538,16 @@ static int
read1char(int echo)
{
char c;
+ int q = queue_signal_level();
+ dont_queue_signals();
while (read(SHTTY, &c, 1) != 1) {
- if (errno != EINTR || errflag || retflag || breaks || contflag)
+ if (errno != EINTR || errflag || retflag || breaks || contflag) {
+ restore_queue_signals(q);
return -1;
+ }
}
+ restore_queue_signals(q);
if (echo)
write_loop(SHTTY, &c, 1);
return STOUC(c);
--
Barton E. Schaefer
Messages sorted by:
Reverse Date,
Date,
Thread,
Author