#include <lib-lib/lib-lib.h>
-#include <lib-ui/curses.h>
+#include <lib-ui/lib-ui.h>
#include "mutt_signal.h"
/* 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)
switch (sig) {
case SIGTSTP: /* user requested a suspend */
- if (!option (OPTSUSPEND))
- break;
IsEndwin = isendwin ();
curs_set (1);
if (!IsEndwin)
case SIGCONT:
if (!IsEndwin)
- wrefresh (stdscr);
+ refresh();
mutt_curs_set (-1);
/* 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;
break;
+ case SIGCHLD:
+ SigChild = 1;
+ break;
+
case SIGINT:
SigInt = 1;
break;
-
}
errno = save_errno;
}
/* 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 */