diff options
author | 2016-07-15 13:26:57 +0000 | |
---|---|---|
committer | 2016-07-15 13:32:47 +0000 | |
commit | 42d8290f21d5ae836ac2aa65166aa84afda8b872 (patch) | |
tree | 2a065375e444b81ee196d007ba874bc4964f20d2 /src/main/cpp | |
parent | a83ac07b6f367bbc6b271c79d748f69a712a3138 (diff) |
Fix Windows tests.
--
Change-Id: Ib480661ebbc522007edd77b374d6720d216b4508
Reviewed-on: https://bazel-review.googlesource.com/#/c/4050
MOS_MIGRATED_REVID=127534581
Diffstat (limited to 'src/main/cpp')
-rw-r--r-- | src/main/cpp/blaze_util_mingw.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/main/cpp/blaze_util_mingw.cc b/src/main/cpp/blaze_util_mingw.cc index c5ebbdba80..08d3ae705f 100644 --- a/src/main/cpp/blaze_util_mingw.cc +++ b/src/main/cpp/blaze_util_mingw.cc @@ -263,7 +263,9 @@ string RunProgram( &processInfo); // _Out_ LPPROCESS_INFORMATION lpProcessInformation if (!ok) { - pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, "CreateProcess"); + pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, + "RunProgram/CreateProcess: Error %d while executing %s", + GetLastError(), cmdline.cmdline); } CloseHandle(pipe_write); @@ -378,21 +380,23 @@ void ExecuteDaemon(const string& exe, const std::vector<string>& args_vector, SetEnvironmentVariable("BAZEL_SH", getenv("BAZEL_SH")); bool ok = CreateProcess( - NULL, // _In_opt_ LPCTSTR lpApplicationName, + NULL, // _In_opt_ LPCTSTR lpApplicationName, // _Inout_opt_ LPTSTR lpCommandLine, cmdline.cmdline, - NULL, // _In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes, - NULL, // _In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes, - TRUE, // _In_ BOOL bInheritHandles, + NULL, // _In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes, + NULL, // _In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes, + TRUE, // _In_ BOOL bInheritHandles, // _In_ DWORD dwCreationFlags, - DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP | CREATE_BREAKAWAY_FROM_JOB, + DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP, NULL, // _In_opt_ LPVOID lpEnvironment, NULL, // _In_opt_ LPCTSTR lpCurrentDirectory, &startupInfo, // _In_ LPSTARTUPINFO lpStartupInfo, &processInfo); // _Out_ LPPROCESS_INFORMATION lpProcessInformation if (!ok) { - pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, "CreateProcess"); + pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, + "ExecuteDaemon/CreateProcess: error %u executing: %s\n", + GetLastError(), cmdline.cmdline); } CloseHandle(output_file); @@ -478,7 +482,8 @@ void ExecuteProgram( &processInfo); // _Out_ LPPROCESS_INFORMATION lpProcessInformation if (!success) { - pdie(255, "Error %u executing: %s\n", GetLastError(), cmdline); + pdie(255, "ExecuteProgram/CreateProcess: error %u executing: %s\n", + GetLastError(), cmdline.cmdline); } if (!AssignProcessToJobObject(job, processInfo.hProcess)) { |