7
1
Greetings fellow Emacsers
I'm running GNU Emacs 23.1.1 on "Ubuntu 10.04.1 LTS" and any search I perform using the built-in M-x rgrep on the standard Linux kernel source code (vanilla) ends prematurely with the following error printed to the emacs echo area:
Grep exited abnormally with code 123
I have been seeing it for a while on Redhat systems as well, and with other (large) code bases, Anybody seen or even better cured that?
Thanks!
Edit: for reasons beyond me stackexchange does not allow me to edit my comment below so I'll update here.
following the comment below I have tried to run the same command that rgrep runs in an emacs shell buffer
find . \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path \*/MCVS -o -path \*/.svn -o -path \*/.git
-o -path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o -type f \( -name \*.\[ch\] \) -p
rint0 | xargs -0 -e grep -i -nH -e v4l_compat_ioctl32
while it does not print any error, interrogating the exit code shows the same 123 again.
/home/mcradle/linux> echo $?
123
following the comment from Gilles I've tried to run
/home/mcradle/linux> find . -type f \( -name \*.\[ch\] \) -exec grep -i -nH -e v4l_compat_ioctl32 '{}' \;
which is functionally equivalent to the find and xargs combination and it completed with exit code 0
/home/mcradle/linux> echo $?
0
so it does seems to be something with xargs.
1
M-x rgrep
runsfind … | xargs grep …
, and 123 means that at least one ofxargs
's invocations ofgrep
returned a non-zero error code. If this happens only in large code bases, it might be related toxargs
invoking more than one instance ofgrep
(perhaps one instance finds no file?). Is a*grep*
buffer created? – Gilles 'SO- stop being evil' – 2010-10-07T23:00:28.787it does open the *grep* buffer even shows a bunch of results and then prints "Grep exited abnormally with code 123 at ..." – Mcradle – 2010-10-08T14:51:57.703