emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixing Windows and DOS command line argument quoting


From: Ben Key
Subject: Re: Fixing Windows and DOS command line argument quoting
Date: Tue, 26 Apr 2011 19:58:49 -0500

Daniel Colascione writes:

> 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.

You are exaggerating a great deal.  It is a single function call, ExpandEnvironmentStrings, documented at http://msdn.microsoft.com/en-us/library/ms724265%28v=vs.85%29.aspx.  Patching cmdproxy.c to use ExpandEnvironmentStrings before calling CreateProcess would add at most 10 lines of code.  This is by no means "reimplementing half of cmd.exe."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]