From 843ddcb43066f21a2b349160fb3bd3b54e62a24b Mon Sep 17 00:00:00 2001 From: des Date: Thu, 28 Jun 2007 12:07:51 +0000 Subject: [PATCH] Handle Ctrl-Z and Ctrl-T. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1590 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishstat/varnishstat.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishstat/varnishstat.c b/varnish-cache/bin/varnishstat/varnishstat.c index 0d4f1f10..8362f58c 100644 --- a/varnish-cache/bin/varnishstat/varnishstat.c +++ b/varnish-cache/bin/varnishstat/varnishstat.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -142,17 +143,24 @@ do_curses(struct varnish_stats *VSL_stats, int delay) case KEY_RESIZE: erase(); break; - case '\014': + case '\014': /* Ctrl-L */ + case '\024': /* Ctrl-T */ redrawwin(stdscr); refresh(); break; case '\003': /* Ctrl-C */ + raise(SIGINT); + break; + case '\032': /* Ctrl-Z */ + raise(SIGTSTP); + break; case '\021': /* Ctrl-Q */ case 'Q': case 'q': endwin(); - return; + exit(0); default: + beep(); break; } } -- 2.39.5