]> Dogcows Code - chaz/openbox/commitdiff
catch the SIGTTOU and SIGTTIN signals when an app we launch tries to use its stdin...
authorDana Jansens <danakj@orodu.net>
Fri, 15 Jan 2010 20:48:56 +0000 (15:48 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 15 Jan 2010 21:06:28 +0000 (16:06 -0500)
openbox/openbox.c

index 698890814bd8a2d1e219c6bff7855e35e048b22b..d2b66b5b08516e62d41608d42df4443ec16d8b56 100644 (file)
@@ -166,6 +166,8 @@ gint main(gint argc, gchar **argv)
     obt_main_loop_signal_add(ob_main_loop, SIGHUP, signal_handler,  NULL,NULL);
     obt_main_loop_signal_add(ob_main_loop, SIGPIPE, signal_handler, NULL,NULL);
     obt_main_loop_signal_add(ob_main_loop, SIGCHLD, signal_handler, NULL,NULL);
+    obt_main_loop_signal_add(ob_main_loop, SIGTTIN, signal_handler, NULL,NULL);
+    obt_main_loop_signal_add(ob_main_loop, SIGTTOU, signal_handler, NULL,NULL);
 
     ob_screen = DefaultScreen(obt_display);
 
@@ -504,6 +506,10 @@ static void signal_handler(gint signal, gpointer data)
         /* reap children */
         while (waitpid(-1, NULL, WNOHANG) > 0);
         break;
+    case SIGTTIN:
+    case SIGTTOU:
+        ob_debug("Caught signal %d. Ignoring.", signal);
+        break;
     default:
         ob_debug("Caught signal %d. Exiting.", signal);
         /* TERM and INT return a 0 code */
This page took 0.023602 seconds and 4 git commands to generate.