commit 6f239bd692bd1b225612aa6d83c0a55a9a965625
parent 3e3e3963e49525481a9af8f26597e8a9521e0990
Author: sin <sin@2f30.org>
Date: Mon, 6 Jun 2016 16:20:35 +0100
Mask SIGINT and SIGQUIT for release builds
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/ncmixer.c b/ncmixer.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
+#include <signal.h>
#include <sndio.h>
#include <stdarg.h>
#include <stdio.h>
@@ -513,6 +514,10 @@ main(int argc, char *argv[])
outputs[1].name = argv[2];
if (isatty(0) == 0 || isatty(1) == 0)
errx(1, "stdin or stdout is not a tty");
+#ifndef DEBUG
+ signal(SIGINT, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
+#endif
nuke_fds();
curses_init();
erase();