Temporary workaround for SIGTIN and SIGTOU unhappiness with posix_spawn

Fixes https://github.com/fish-shell/fish-shell/issues/278
This commit is contained in:
ridiculousfish 2012-08-15 17:25:33 -07:00
parent df1b4e1f21
commit c5ffe8a974

View file

@ -633,6 +633,14 @@ void get_signals_with_handlers(sigset_t *set)
sigemptyset(set); sigemptyset(set);
for( int i=0; lookup[i].desc ; i++ ) 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 = {}; struct sigaction act = {};
sigaction(lookup[i].signal, NULL, &act); sigaction(lookup[i].signal, NULL, &act);
if (act.sa_handler != SIG_DFL) if (act.sa_handler != SIG_DFL)