From: Dana Jansens Date: Fri, 15 Jan 2010 20:48:56 +0000 (-0500) Subject: catch the SIGTTOU and SIGTTIN signals when an app we launch tries to use its stdin... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=8d7ab691b8bbbeca42484d61375387ef5c2f4878;p=chaz%2Fopenbox catch the SIGTTOU and SIGTTIN signals when an app we launch tries to use its stdin/out (but we don't have one either). Fixes bug #4072. --- diff --git a/openbox/openbox.c b/openbox/openbox.c index 69889081..d2b66b5b 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -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 */