On 4/25/11 2:22 AM, Daniel Colascione wrote: > CreateProcess supports 32kb of command line; cmd supports 8kb. If the > extra 24kb is important, then we can do what you suggest: > shell-quote-argument would also to be further modified to only use level > 2 metacharacters when strictly necessary. Bear in mind that the new > limit would apply only to *shell* commands explicitly, not to subprocess > invocations in general, which would continue to be handled directly by > the code in w32proc. Besides, I think it's counter-intuitive for a > shell pipeline to stop working merely because it contains more than one > command. After another reading of cmdproxy.c, I also see that the CreateProcess path also doesn't expand environment %variable% references, and that doesn't fall back to cmd if the command to be executed contains them. While we could expand these variables, doing so would move us even closer to reimplementing half of cmd.exe. I'd like to remove this path in the trunk and see whether the new 8192-character length limitation is a problem in practice. Direct process execution will not be affected: "shell command" will just mean "shell command", not "maybe run through the shell if we kinda guess you really meant to use the shell".