Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Ctrl-c not working during correction with 5.1



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