summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2021-07-13 20:38:08 +0200
committerBenBE <BenBE@geshi.org>2021-07-13 20:42:30 +0200
commitbf22a8fb13c9495466051caa5a0c0e9c1f9de0df (patch)
treed7f87fdcad26949c3097d7fe772141706532f332 /CRT.c
parent09c7e3e136d30e00759dc28b4614df61b869cb71 (diff)
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.
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c1
1 files changed, 1 insertions, 0 deletions
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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy