mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Real fix for https://github.com/fish-shell/fish-shell/issues/278
We forget to set the parent group ID in posix_spawn (!)
This commit is contained in:
parent
a9b119833a
commit
26857fabdc
2 changed files with 3 additions and 8 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue