summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-01 23:30:40 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-01 23:30:40 +0000
commit676673e960e3bc0204a2057592cc472153e5f4e7 (patch)
treed84cbd671831a456b5bea68357e3e0c0d74ac92c
parentdefb53e6ce095d18a527db24c2591983b5f6532a (diff)
downloadirssi-676673e960e3bc0204a2057592cc472153e5f4e7.zip
Removed "ignore_sigquit" and added "ignore_signals" instead. You can ignore
signals: hup, int, quit, term, pipe, alrm, usr1, usr2 git-svn-id: http://svn.irssi.org/repos/irssi/trunk@268 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/fe-text/screen.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/fe-text/screen.c b/src/fe-text/screen.c
index 148a3745..41e9b96b 100644
--- a/src/fe-text/screen.c
+++ b/src/fe-text/screen.c
@@ -20,6 +20,7 @@
#include "module.h"
#include "signals.h"
+#include "misc.h"
#include "settings.h"
#include "screen.h"
@@ -85,8 +86,19 @@ void sigint_handler(int p)
static void read_settings(void)
{
+ const char *ignores;
+
use_colors = settings_get_bool("colors");
- signal(SIGQUIT, settings_get_bool("ignore_sigquit") ? SIG_IGN : SIG_DFL);
+
+ ignores = settings_get_str("ignore_signals");
+ signal(SIGHUP, find_substr(ignores, "hup") ? SIG_IGN : SIG_DFL);
+ signal(SIGINT, find_substr(ignores, "int") ? SIG_IGN : SIG_DFL);
+ signal(SIGQUIT, find_substr(ignores, "quit") ? SIG_IGN : SIG_DFL);
+ signal(SIGTERM, find_substr(ignores, "term") ? SIG_IGN : SIG_DFL);
+ signal(SIGPIPE, find_substr(ignores, "pipe") ? SIG_IGN : SIG_DFL);
+ signal(SIGALRM, find_substr(ignores, "alrm") ? SIG_IGN : SIG_DFL);
+ signal(SIGUSR1, find_substr(ignores, "usr1") ? SIG_IGN : SIG_DFL);
+ signal(SIGUSR2, find_substr(ignores, "usr2") ? SIG_IGN : SIG_DFL);
irssi_redraw();
}
@@ -109,7 +121,7 @@ int init_screen(void)
intrflush(stdscr, FALSE); halfdelay(1); keypad(stdscr, 1);
settings_add_bool("lookandfeel", "colors", TRUE);
- settings_add_bool("misc", "ignore_sigquit", FALSE);
+ settings_add_str("misc", "ignore_signals", "");
use_colors = settings_get_bool("colors") && has_colors();
if (has_colors()) start_color();