From c5ffe8a9748c1cc2a44fc573ac6f8e752f9f8f72 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 15 Aug 2012 17:25:33 -0700 Subject: [PATCH] Temporary workaround for SIGTIN and SIGTOU unhappiness with posix_spawn Fixes https://github.com/fish-shell/fish-shell/issues/278 --- signal.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/signal.cpp b/signal.cpp index 2c51e9d2f..bbe462fe7 100644 --- a/signal.cpp +++ b/signal.cpp @@ -633,6 +633,14 @@ void get_signals_with_handlers(sigset_t *set) sigemptyset(set); for( int i=0; lookup[i].desc ; i++ ) { + /* Don't include SIGTTIN or SIGTTOU until we figure out how to set the controlling terminal in POSIX_SPAWN */ +#ifdef SIGTTIN + if (i == SIGTTIN) continue; +#endif +#ifdef SIGTTOU + if (i == SIGTTOU) continue; +#endif + struct sigaction act = {}; sigaction(lookup[i].signal, NULL, &act); if (act.sa_handler != SIG_DFL)