From 8d7ab691b8bbbeca42484d61375387ef5c2f4878 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 15 Jan 2010 15:48:56 -0500 Subject: [PATCH] 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. --- openbox/openbox.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 */ -- 2.45.2