diff options
author | U-MATHLETE\John <John@MATHLETE.(none)> | 2011-06-26 11:25:45 (GMT) |
---|---|---|
committer | U-MATHLETE\John <John@MATHLETE.(none)> | 2011-06-26 11:25:45 (GMT) |
commit | f1daa238fd531689627e2a508bf5d5cf39f9312b (patch) | |
tree | ae7296d8577b76772947c604edb065bef4b1363c /src/subprocess-win32.cc | |
parent | cdb981e337297da7046e4daa5c2e055bf6b8d95b (diff) | |
download | Ninja-f1daa238fd531689627e2a508bf5d5cf39f9312b.zip Ninja-f1daa238fd531689627e2a508bf5d5cf39f9312b.tar.gz Ninja-f1daa238fd531689627e2a508bf5d5cf39f9312b.tar.bz2 |
Fix for win32 long command lines:
- remove 'cmd /c' prepend from SubProcess::Start()
- fix the subprocess tests to prepend 'cmd /c' explicitly
Diffstat (limited to 'src/subprocess-win32.cc')
-rw-r--r-- | src/subprocess-win32.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc index 9fbe03f..49ccfa8 100644 --- a/src/subprocess-win32.cc +++ b/src/subprocess-win32.cc @@ -102,8 +102,9 @@ bool Subprocess::Start(struct SubprocessSet* set, const string& command) { PROCESS_INFORMATION process_info; - string full_command = "cmd /c " + command; - if (!CreateProcessA(NULL, (char*)full_command.c_str(), NULL, NULL, + // Do not prepend 'cmd /c' on Windows, this breaks command + // lines greater than 8,191 chars. + if (!CreateProcessA(NULL, (char*)command.c_str(), NULL, NULL, /* inherit handles */ TRUE, 0, NULL, NULL, &startup_info, &process_info)) { |