diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2003-11-28 23:15:17 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2003-11-28 23:15:17 +0000 |
commit | 4f23a3c621c7b5369fe453e15536f96cc06ecab8 (patch) | |
tree | 983ecc77437dd210abd99b2e6e78cd0f0f2b2a86 /src | |
parent | ba618d3276532a16e31a25f02fbddb04d67ac526 (diff) | |
download | weechat-4f23a3c621c7b5369fe453e15536f96cc06ecab8.zip |
SIGINT signal (Ctrl-C) intercepted, handler does nothing
Diffstat (limited to 'src')
-rw-r--r-- | src/common/weechat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/weechat.c b/src/common/weechat.c index 75262fecc..8f9c93452 100644 --- a/src/common/weechat.c +++ b/src/common/weechat.c @@ -50,6 +50,7 @@ #include <string.h> #include <sys/stat.h> #include <time.h> +#include <signal.h> #include "weechat.h" #include "weeconfig.h" @@ -66,6 +67,15 @@ FILE *log_file; /* WeeChat log file (~/.weechat/weechat.log */ /* + * my_sigint: SIGINT handler, do nothing (just ignore this signal) + */ + +void +my_sigint () +{ +} + +/* * wee_log_printf: displays a message in WeeChat log (~/.weechat/weechat.log) */ @@ -237,6 +247,9 @@ main (int argc, char *argv[]) textdomain (PACKAGE); #endif + /* ignore SIGINT signal (for example Ctrl-C) */ + signal (SIGINT, my_sigint); + /* pre-initiliaze interface */ gui_pre_init (&argc, &argv); |