X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-sys%2Fmutt_signal.c;h=2728656df09d97812ad5576ac152813d4ff10b62;hp=a21eba8946c7f067b7cf5850d957ca67d16a479d;hb=0b38190e1f839237d104c1094cd34fb2388c81df;hpb=8ab1ab66eb1c4b95f9b2a5ed9c2b2cf1dfa74544 diff --git a/lib-sys/mutt_signal.c b/lib-sys/mutt_signal.c index a21eba8..2728656 100644 --- a/lib-sys/mutt_signal.c +++ b/lib-sys/mutt_signal.c @@ -22,15 +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); -} - -static void chld_handler(int sig __attribute__((unused))) -{ - /* empty */ + curs_set(1); + endwin(); /* just to be safe */ + printf(_("Caught %s... Exiting.\n"), strsignal(sig)); + exit(0); } static void sighandler (int sig) @@ -39,8 +34,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) @@ -57,6 +50,10 @@ static void sighandler (int sig) SigWinch = 1; break; + case SIGCHLD: + SigChild = 1; + break; + case SIGINT: SigInt = 1; break; @@ -102,7 +99,6 @@ void mutt_signal_initialize (void) /* POSIX doesn't allow us to ignore SIGCHLD, * so we just install a dummy handler for it */ - act.sa_handler = chld_handler; /* don't need to block any other signals here */ sigemptyset (&act.sa_mask); /* we don't want to mess with stopped children */