aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/StartProcess.cpp
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-04-30 00:23:08 +0200
committerNaios <naios-dev@live.de>2016-05-01 01:45:10 +0200
commit8f05a4779313b1f3de0c2d2817e8804f52d47548 (patch)
treea4e5f3ff98e6d7770086f9b0533a2ff4addaa3f8 /src/common/Utilities/StartProcess.cpp
parentd9f7692c2e1e647271f4b857a98f41236b9a8c34 (diff)
Core/Utilities: Inherit env vars when starting external processes
(cherry picked from commit 5b15b714abfa5d8a38f08046dae5a5348c08b5a1)
Diffstat (limited to 'src/common/Utilities/StartProcess.cpp')
-rw-r--r--src/common/Utilities/StartProcess.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/Utilities/StartProcess.cpp b/src/common/Utilities/StartProcess.cpp
index 29feeaa2714..1e27b14f18a 100644
--- a/src/common/Utilities/StartProcess.cpp
+++ b/src/common/Utilities/StartProcess.cpp
@@ -92,6 +92,7 @@ static int CreateChildProcess(T waiter, std::string const& executable,
// With binding stdin
return execute(run_exe(boost::filesystem::absolute(executable)),
set_args(args),
+ inherit_env(),
bind_stdin(*inputSource),
bind_stdout(file_descriptor_sink(outPipe.sink, close_handle)),
bind_stderr(file_descriptor_sink(errPipe.sink, close_handle)));
@@ -101,6 +102,7 @@ static int CreateChildProcess(T waiter, std::string const& executable,
// Without binding stdin
return execute(run_exe(boost::filesystem::absolute(executable)),
set_args(args),
+ inherit_env(),
bind_stdout(file_descriptor_sink(outPipe.sink, close_handle)),
bind_stderr(file_descriptor_sink(errPipe.sink, close_handle)));
}