mirror of git://git.code.sf.net/p/zsh/code
36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts
This commit is contained in:
parent
21382e0b20
commit
3747f6b6ab
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue