|
|
On Wed, May 11, 2005 at 08:54:51PM -0400, Charles Shannon Hendrix wrote:
In any case, my original point stands: the limit comes from the shell.
No, your original point is still wrong, and the limit comes from the
kernel. An application calling exec (e.g., the shell) provides some
memory for the argument list and environment, but the kernel then copies
it into the proper spot for the program about to be executed--that's
where the limit comes in. If the shell tries to exec with too many
command line arguments or environment variables the kernel will send
back the error code E2BIG, which is displayed as "Argument list too
long". POSIX mandates a minimum of 4096 bytes for the limit on arguments
to the execve(2) function, You can use `getconf ARG_MAX` to determine
the limit on a particular system. The default on linux is 128k, solaris
is 1M, IRIX is 20k, OSF1 is 40k, fbsd is 64k, obsd is 256k, etc. On some
systems that value is a runtime tunable, on others you'd need to
recompile to change it. In general, playing with that value is a bad
idea and you should just code your app to handle the command line limit
gracefully. Try http://www.in-ulm.de/~mascheck/various/argmax/ for a
longer explanation.
Mike Stone
_______________________________________________
ma-linux mailing list
ma-linux@xxxxxxx
http://www.tux.org/mailman/listinfo/ma-linux
|
|