commit 3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c Author: Barton E. Schaefer Date: Tue Sep 1 11:26:06 2015 -0700 36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts 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);