X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-sys%2Fmutt_signal.c;h=0c535673d25e21d895bfc17baa3bce108298ee96;hp=8609671b937c3d1c36864f2dc7ce21de399e8298;hb=e0571c496935f226abe4a22921b5b4e10d1481e8;hpb=84bc6d1930165b21919541b3b24294a9d99c3541 diff --git a/lib-sys/mutt_signal.c b/lib-sys/mutt_signal.c index 8609671..0c53567 100644 --- a/lib-sys/mutt_signal.c +++ b/lib-sys/mutt_signal.c @@ -9,7 +9,7 @@ #include -#include +#include #include "mutt_signal.h" @@ -22,10 +22,10 @@ static int IsEndwin = 0; /* Attempt to catch "ordinary" signals and shut down gracefully. */ static void exit_handler (int sig) { - curs_set (1); - endwin (); /* just to be safe */ - printf(_("Caught %s... Exiting.\n"), strsignal(sig)); - exit (0); + curs_set(1); + endwin(); /* just to be safe */ + printf(_("Caught %s... Exiting.\n"), strsignal(sig)); + exit(0); } static void chld_handler(int sig __attribute__((unused))) @@ -39,8 +39,6 @@ static void sighandler (int sig) switch (sig) { case SIGTSTP: /* user requested a suspend */ - if (!option (OPTSUSPEND)) - break; IsEndwin = isendwin (); curs_set (1); if (!IsEndwin) @@ -49,25 +47,17 @@ static void sighandler (int sig) case SIGCONT: if (!IsEndwin) - refresh (); + refresh(); mutt_curs_set (-1); -#if defined (HAVE_RESIZETERM) /* We don't receive SIGWINCH when suspended; however, no harm is done by * just assuming we received one, and triggering the 'resize' anyway. */ - SigWinch = 1; -#endif - break; - -#if defined (HAVE_RESIZETERM) case SIGWINCH: SigWinch = 1; break; -#endif case SIGINT: SigInt = 1; break; - } errno = save_errno; } @@ -105,9 +95,7 @@ void mutt_signal_initialize (void) sigaction (SIGCONT, &act, NULL); sigaction (SIGTSTP, &act, NULL); sigaction (SIGINT, &act, NULL); -#if defined (HAVE_RESIZETERM) sigaction (SIGWINCH, &act, NULL); -#endif /* POSIX doesn't allow us to ignore SIGCHLD, * so we just install a dummy handler for it @@ -129,9 +117,7 @@ void mutt_block_signals (void) sigaddset (&Sigset, SIGHUP); sigaddset (&Sigset, SIGTSTP); sigaddset (&Sigset, SIGINT); -#if defined (HAVE_RESIZETERM) sigaddset (&Sigset, SIGWINCH); -#endif sigprocmask (SIG_BLOCK, &Sigset, 0); set_option (OPTSIGNALSBLOCKED); }