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.

This commit is contained in:
Dana Jansens 2010-01-15 15:48:56 -05:00
parent 0e3ce9e407
commit 8d7ab691b8

View 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 */