Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Aug 2010 06:10:10 +0300

> Date: Sun, 01 Aug 2010 20:21:43 -0600
> From: Christoph <[email-masked]>
> CC: [email-masked], [email-masked], [email-masked]
> 
> On 7/20/2010 10:02 PM, Eli Zaretskii wrote:
> 
> > Thanks.  To make my intent clear: I meant to enhance cmdproxy to use a
> > batch file when invoking the windows shell.  You will see that there's
> > a variable need_shell in cmdproxy's `main' function which gets set to
> > a non-zero value when cmdproxy decides it needs to pass the command
> > the the shell instead of invoking it directly.  What I suggested is to
> > modify the code in this case to put the command on a temporary batch
> > file, then invoke the shell on that batch file rather than on the
> > command itself.
> 
> Eli,
> I remember a comment of yours earlier in the thread that DOS does not 
> have the problem.

That's right.

> I assume that this is due to a difference in command.com vs cmd.exe?

No.  That's because the DOS port doesn't call command.com at all.  It
has its own implementation of a shell as part of the `system' function
in the standard library it links against.  That implementation
supports pipes, redirection, quoting, long (up to 16KB) command lines,
and a few other minor Posix features, like /dev/null.

> Do we want to execute the batch file only in case of cmd.exe or for both 
> command.com and cmd.exe?

Yes, for the benefit of Windows 9X.

Thanks.