From bf22a8fb13c9495466051caa5a0c0e9c1f9de0df Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Tue, 13 Jul 2021 20:38:08 +0200 Subject: Add SIGINT handler This SIGINT handler is installed on top of an optional handler that some curses/ncurses implementations provide. This ensures the curser is properly reset when hitting Ctrl+C. --- CRT.c | 1 + 1 file changed, 1 insertion(+) (limited to 'CRT.c') diff --git a/CRT.c b/CRT.c index 6418f9ad..6f228606 100644 --- a/CRT.c +++ b/CRT.c @@ -885,6 +885,7 @@ void CRT_init(const Settings* settings, bool allowUnicode) { sigaction (SIGSYS, &act, &old_sig_handler[SIGSYS]); sigaction (SIGABRT, &act, &old_sig_handler[SIGABRT]); + signal(SIGINT, CRT_handleSIGTERM); signal(SIGTERM, CRT_handleSIGTERM); signal(SIGQUIT, CRT_handleSIGTERM); -- cgit v1.2.3