Don't use posix_spawn for commands that need to be put into foreground to avoid a race

Fix for race where a command's output may not be fully drained
This commit is contained in:
ridiculousfish
2012-11-04 15:45:52 -08:00
parent e46324ced9
commit 5e371e8fe7
4 changed files with 28 additions and 14 deletions

View File

@@ -386,6 +386,7 @@ bool fork_actions_make_spawn_properties(posix_spawnattr_t *attr, posix_spawn_fil
// means that the process becomes its own
// group leader, which is what set_child_group did
// in this case. So we want this to be 0 if j->pgid is 0.
//if (!j->pgid) j->pgid = getpid();
desired_parent_group_id = j->pgid;
}