aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Win32/Program.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-14 04:18:51 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-14 04:18:51 +0000
commite2e2411f40af9611c3a0c00e21acbf86946b1fd4 (patch)
treefec42b5b97970de409400b019ee07df8a6b92ac1 /lib/System/Win32/Program.cpp
parent44f6966ef076b223b69da893c438236ea0fc677e (diff)
For PR351:
Implement the new environment pointer for ExecuteAndWait git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32/Program.cpp')
-rw-r--r--lib/System/Win32/Program.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/System/Win32/Program.cpp b/lib/System/Win32/Program.cpp
index d6bd86ad2d..4aff5e969c 100644
--- a/lib/System/Win32/Program.cpp
+++ b/lib/System/Win32/Program.cpp
@@ -69,7 +69,8 @@ Program::FindProgramByName(const std::string& progName) {
//
int
Program::ExecuteAndWait(const Path& path,
- const std::vector<std::string>& args) {
+ const std::vector<std::string>& args,
+ const char** env) {
if (!path.executable())
throw path.toString() + " is not executable";
@@ -124,8 +125,9 @@ Program::ExecuteAndWait(const Path& path,
PROCESS_INFORMATION pi;
memset(&pi, 0, sizeof(pi));
+ LPVOID lpEnvironment = envp;
if (!CreateProcess(path.c_str(), command, NULL, NULL, FALSE, 0,
- NULL, NULL, &si, &pi))
+ lpEnvironment, NULL, &si, &pi))
{
ThrowError(std::string("Couldn't execute program '") +
path.toString() + "'");