From d7e0cbd7795bec43e9e9f11a42a7019f18bf9e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 25 Jul 2017 20:07:48 +0200 Subject: vis: ignore SIGQUIT Pressing Ctrl+\ should probably not terminate the editor. In previous versions libtermkey would disable signal generation by disabling termios VQUIT. However, curses probably overrides it when they both fight for terminal settings. This should probably be cleaned up at some point. Ignoring SIGQUIT seems like a good idea anyway. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index f63fbbf..3334ed9 100644 --- a/main.c +++ b/main.c @@ -2389,8 +2389,8 @@ int main(int argc, char *argv[]) { } sa.sa_handler = SIG_IGN; - if (sigaction(SIGPIPE, &sa, NULL) == -1) - vis_die(vis, "Failed to ignore SIGPIPE\n"); + if (sigaction(SIGPIPE, &sa, NULL) == -1 || sigaction(SIGQUIT, &sa, NULL) == -1) + vis_die(vis, "Failed to ignore signals\n"); sigset_t blockset; sigemptyset(&blockset); -- cgit v1.2.3