mirror of https://github.com/xzeldon/htop.git
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.
This commit is contained in:
parent
09c7e3e136
commit
bf22a8fb13
1
CRT.c
1
CRT.c
|
@ -885,6 +885,7 @@ void CRT_init(const Settings* settings, bool allowUnicode) {
|
||||||
sigaction (SIGSYS, &act, &old_sig_handler[SIGSYS]);
|
sigaction (SIGSYS, &act, &old_sig_handler[SIGSYS]);
|
||||||
sigaction (SIGABRT, &act, &old_sig_handler[SIGABRT]);
|
sigaction (SIGABRT, &act, &old_sig_handler[SIGABRT]);
|
||||||
|
|
||||||
|
signal(SIGINT, CRT_handleSIGTERM);
|
||||||
signal(SIGTERM, CRT_handleSIGTERM);
|
signal(SIGTERM, CRT_handleSIGTERM);
|
||||||
signal(SIGQUIT, CRT_handleSIGTERM);
|
signal(SIGQUIT, CRT_handleSIGTERM);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue