GNU bug report logs -
#6674
PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS
Previous Next
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
View this message in rfc822 format
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.