Signal sanity.
authorDavid Griffith <dave@661.org>
Tue, 31 Dec 2013 10:18:09 +0000 (02:18 -0800)
committerDavid Griffith <dave@661.org>
Tue, 31 Dec 2013 10:18:09 +0000 (02:18 -0800)
src/curses/ux_init.c

index 0ec7bee0b0f0ae43f4bad9767cbd14be63d3fe68..9d82ffd3877ad33277270b6b9074630dff372583 100644 (file)
@@ -187,6 +187,13 @@ void os_process_arguments (int argc, char *argv[])
     if (signal(SIGINT, SIG_IGN) != SIG_IGN)
        signal(SIGINT, sigint_handler);
 
+    if (signal(SIGTTIN, SIG_IGN) != SIG_IGN)
+       signal(SIGTTIN, SIG_IGN);
+
+    if (signal(SIGTTOU, SIG_IGN) != SIG_IGN)
+       signal(SIGTTOU, SIG_IGN);
+
+
     /* First check for a "$HOME/.frotzrc". */
     /* If not found, look for CONFIG_DIR/frotz.conf */
     /* $HOME/.frotzrc overrides CONFIG_DIR/frotz.conf */
@@ -872,12 +879,14 @@ void sigint_handler(int dummy)
 {
     signal(SIGINT, sigint_handler);
 
+    os_stop_sample(0);
     scrollok(stdscr, TRUE); scroll(stdscr);
     refresh(); endwin();
 
     exit(1);
 }
 
+
 void redraw(void)
 {
        /* not implemented */