From 0d8b9c6677f67cf9624cb5a498a3aa7969a449b6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 8 Oct 2015 20:19:14 +0100 Subject: [PATCH] Tweak handling of SIGINT --- src/main.cc | 1 + src/ncurses_ui.cc | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index 9da4ddb3..fe045b76 100644 --- a/src/main.cc +++ b/src/main.cc @@ -648,6 +648,7 @@ int main(int argc, char* argv[]) signal(SIGQUIT, signal_handler); signal(SIGTERM, signal_handler); signal(SIGPIPE, SIG_IGN); + signal(SIGINT, [](int){}); signal(SIGCHLD, [](int){}); Vector params; diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index 259af46d..4fd6cfbc 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -260,7 +260,6 @@ NCursesUI::NCursesUI() signal(SIGWINCH, on_term_resize); signal(SIGCONT, on_term_resize); - signal(SIGINT, [](int){}); check_resize(true); @@ -276,7 +275,6 @@ NCursesUI::~NCursesUI() restore_colors(); signal(SIGWINCH, SIG_DFL); signal(SIGCONT, SIG_DFL); - signal(SIGINT, SIG_DFL); } void NCursesUI::Window::create(const CharCoord& p, const CharCoord& s)