Commit 3747f6b6 authored by Barton E. Schaefer's avatar Barton E. Schaefer

36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts

parent 21382e0b
2015-09-01 Barton E. Schaefer <schaefer@zsh.org>
* 36376: Src/utils.c: handle signals during read1char() so it is
possible to interrupt correct/correctall prompts
2015-09-01 Peter Stephenson <p.stephenson@samsung.com>
* 36365: Src/Zle/zle_tricky.c: magic-space removed the reset of
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment