From 1f1bcc9e764f4abb25e14532cba9eb6f31aa637a Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Sun, 1 Apr 2018 18:00:28 -0500 Subject: [PATCH] have ncurses handle interrupt characters As it was, didn't handle ^\ SIGQUIT or ^Z SIGTSTP. --- src/main.c | 4 ---- src/ncui.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 07cc231..c912ca5 100644 --- a/src/main.c +++ b/src/main.c @@ -9,7 +9,6 @@ #include #include #include -#include /* ncurses */ #include /* pam */ @@ -46,9 +45,6 @@ int main(void) char* username; char* password; char* cmd; - /* prevents CTRL+C from killing the process */ - signal(SIGINT, SIG_IGN); - signal(SIGHUP, SIG_IGN); /* gets desktop entries */ de_list = list_de(); de_props = de_list->props; diff --git a/src/ncui.c b/src/ncui.c index 39eefbf..e146264 100644 --- a/src/ncui.c +++ b/src/ncui.c @@ -30,7 +30,7 @@ void init_ncurses(FILE* desc) ioctl(filedesc, VT_WAITACTIVE, LY_CONSOLE_TTY); /* ncurses startup */ initscr(); - cbreak(); + raw(); noecho(); }