aboutsummaryrefslogtreecommitdiffhomepage
path: root/postfork.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-11-04 15:45:52 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-11-04 15:45:52 -0800
commit5e371e8fe7cbdecd87678d50d06c12851213776e (patch)
treeb20fc6e456745d7f1016d02ee750101b365185ed /postfork.cpp
parente46324ced9a6e1fa79ffbd56dfed652a3180b0ca (diff)
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
Diffstat (limited to 'postfork.cpp')
-rw-r--r--postfork.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/postfork.cpp b/postfork.cpp
index 4379ca2d..d161712e 100644
--- a/postfork.cpp
+++ b/postfork.cpp
@@ -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;
}