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

This commit is contained in:
Barton E. Schaefer 2015-09-01 11:26:06 -07:00
parent 21382e0b20
commit 3747f6b6ab
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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);