[plug] xargs, "Argument list too long"
Mike Holland
myk at plug.linux.org.au
Thu Jan 30 10:50:12 WST 2003
On Wed, 29 Jan 2003, Russell Steicke wrote:
> > > find . -name "*.[ch]" | xargs etags -a
> > zsh% etags **/*.[ch]
>
> What happens when the arg list gets too long?
It gives an error, and you use xargs instead :-)
I hate that kind of arbitrary limit. This is a kernel design problem.
Googling, I find a Linux Journel article. The author seems unaware of
xargs, but the reader comments at the bottom correct that.
http://www.linuxjournal.com/article.php?sid=6060
So you can re-complile the kernel for longer arg lists, changing:
#define MAX_ARG_PAGES 32
Why does it have to be a fixed number, rather than dynamically allocated
as needed? Lets "use the source":
/usr/src/linux-2.4% grep MAX_ARG_PAGES **/*.c
zsh: argument list too long: grep
Just kidding! It just shows in two files: fs/binfmt_elf.c and fs/exec.c
As usual, almost no comments in the code. That Eric Youngdale is as bad as
Linus.
Can anybody tell me why it would be a really bad idea to try and fix
this? (Replacing MAX_ARG_PAGES with a dynamic num_arg_pages)
--
"I do not think we can hope for any better things now. We shall stick it out
to the end, but we are getting weaker, of course, and the end cannot be far.
It seems a pity, but I do not think I can write more." - RF Scott
More information about the plug
mailing list