summaryrefslogtreecommitdiffstats
path: root/src/subprocess-win32.cc
diff options
context:
space:
mode:
authorU-MATHLETE\John <John@MATHLETE.(none)>2011-06-26 11:25:45 (GMT)
committerU-MATHLETE\John <John@MATHLETE.(none)>2011-06-26 11:25:45 (GMT)
commitf1daa238fd531689627e2a508bf5d5cf39f9312b (patch)
treeae7296d8577b76772947c604edb065bef4b1363c /src/subprocess-win32.cc
parentcdb981e337297da7046e4daa5c2e055bf6b8d95b (diff)
downloadNinja-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.cc5
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)) {