[master] 28b62f1 Fix Ctrl-C handling in varnishhist

Martin Blix Grydeland martin at varnish-software.com
Tue Feb 25 15:58:40 CET 2014


commit 28b62f14c1c5a4767d13763995776aa3a0590cf5
Author: Guillaume Quintard <guillaume.quintard at gmail.com>
Date:   Thu Feb 6 17:40:09 2014 +0100

    Fix Ctrl-C handling in varnishhist

diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 01fc66d..51c87ec 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -288,16 +288,15 @@ do_curses(void *arg)
 			redrawwin(stdscr);
 			refresh();
 			break;
-		case '\003': /* Ctrl-C */
-			raise(SIGINT);
-			break;
 		case '\032': /* Ctrl-Z */
 			endwin();
 			raise(SIGTSTP);
 			break;
+		case '\003': /* Ctrl-C */
 		case '\021': /* Ctrl-Q */
 		case 'Q':
 		case 'q':
+			raise(SIGINT);
 			endwin();
 			pthread_exit(NULL);
 		case '0':



More information about the varnish-commit mailing list