Mercurial > hg
diff mcabber/src/main.c @ 389:6e895f397474
Ncurses changes + Ctrl-C does not send a signal anylore
* Use nonl() when initializing ncurses
* Ctrl-C does not send a signal in raw mode, so we handle it
as a normal key
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 30 Jul 2005 10:36:46 +0100 |
parents | bd5638c21834 |
children | f8f3c7493457 |
line wrap: on
line diff
--- a/mcabber/src/main.c Fri Jul 29 20:28:06 2005 +0100 +++ b/mcabber/src/main.c Sat Jul 30 10:36:46 2005 +0100 @@ -114,17 +114,8 @@ signal(SIGCHLD, sig_handler); } else if (signum == SIGTERM) { mcabber_disconnect("Killed by SIGTERM"); - } else if (signum == SIGINT) { // Ctrl-C - static time_t LastSigtermTime; - time_t now; - time(&now); - /* Terminate if 2 consecutive SIGTERMs */ - if (now - LastSigtermTime < 2) - mcabber_disconnect("Killed by SIGINT"); - LastSigtermTime = now; - signal(SIGINT, sig_handler); - scr_handle_sigint(); - scr_LogPrint(LPRINT_NORMAL, "Hit Ctrl-C twice to leave mcabber"); + } else if (signum == SIGINT) { + mcabber_disconnect("Killed by SIGINT"); } else { scr_LogPrint(LPRINT_LOGNORM, "Caught signal: %d", signum); }