We forget to set the parent group ID in posix_spawn (!)
This commit is contained in:
ridiculousfish 2012-08-15 17:32:57 -07:00
parent a9b119833a
commit 26857fabdc
2 changed files with 3 additions and 8 deletions

View file

@ -412,6 +412,9 @@ bool fork_actions_make_spawn_properties(posix_spawnattr_t *attr, posix_spawn_fil
if (! err)
err = posix_spawnattr_setflags(attr, flags);
if (! err && should_set_parent_group_id)
err = posix_spawnattr_setpgroup(attr, desired_parent_group_id);
/* Everybody gets default handlers */
if (! err && reset_signal_handlers)
{

View file

@ -633,14 +633,6 @@ 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 (lookup[i].signal == SIGTTIN) continue;
#endif
#ifdef SIGTTOU
if (lookup[i].signal == SIGTTOU) continue;
#endif
struct sigaction act = {};
sigaction(lookup[i].signal, NULL, &act);
if (act.sa_handler != SIG_DFL)