raw() mode also disabled SIGINT == ^C, so remove the 5x^C = SIGTERM.

Also use sigaction() instead of signal() with /SET ignore_signals.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1500 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-05-17 11:47:21 +00:00 committed by cras
commit a88cd53ea5
2 changed files with 23 additions and 29 deletions

View file

@ -35,9 +35,6 @@
#include <signal.h>
#undef CTRL
#define CTRL(x) ((x) & 0x1f) /* Ctrl+x */
typedef void (*ENTRY_REDIRECT_KEY_FUNC) (int key, void *data, SERVER_REC *server, WI_ITEM_REC *item);
typedef void (*ENTRY_REDIRECT_ENTRY_FUNC) (const char *line, void *data, SERVER_REC *server, WI_ITEM_REC *item);
@ -51,7 +48,7 @@ static KEYBOARD_REC *keyboard;
static ENTRY_REDIRECT_REC *redir;
char *cutbuffer;
static int readtag, sigint_count = 0;
static int readtag;
static time_t idle_time;
static void handle_key_redirect(int key)
@ -121,12 +118,6 @@ void handle_key(int key)
{
char str[3];
/* Quit if we get 5 CTRL-C's in a row. */
if (key != CTRL('c'))
sigint_count = 0;
else if (++sigint_count >= 5)
raise(SIGTERM);
idle_time = time(NULL);
if (redir != NULL && redir->flags & ENTRY_REDIRECT_FLAG_HOTKEY) {