GNU bug report logs - #6674
PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Tue, 20 Jul 2010 03:51:02 UTC

Severity: normal

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 6674 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lekktu <at> gmail.com, 6674 <at> debbugs.gnu.org
Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs
	on	Windows/MS-DOS
Date: Tue, 20 Jul 2010 21:51:39 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

[snip]

> By trial and error I established that the limit beyond which rgrep
> fails is 1024 characters.  This is consistent with the MSDN
> documentation of _spawn, e.g.

[snip]

> So we could either (1) install Óscar's patch, with the disadvantage
> that rgrep will be slower on MS-Windows (because a separate Grep is
> invoked on each file found by Find), or (2) fix cmdproxy to use a
> better API, such as CreateProcess, which doesn't have this limitation.

cmdproxy.c does not call the C runtime `_spawn' function. It defines its
own `spawn' that calls CreateProcess.

The issue is that "cmd.exe -c" seems to have a 1024 char limit when the
command contains a pipe (my guess is that the limit applies separatelly
to every command on the pipe chain) and cmdproxy.c prepends "cmd.exe -c"
to the command when it has a pipe, redirection, etc.

> In any case, please do NOT install the patch for the MS-DOS build.  As
> I wrote earlier, it does not have this problem.

Okay.




This bug report was last modified 14 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.