argument list too long

Mel fbsd.questions at
Wed Feb 27 10:19:35 UTC 2008

On Wednesday 27 February 2008 10:16:20 Erik Norgaard wrote:

> Then a sysctl -a seems to indicate it is also a kernel 
> limitation on FreeBSD:
> kern.argmax: 262144
> I'm not certain that this is the limit of command line arguments, and I
>   haven't tried to set it. Nor is it clear to me if this is the number
> of arguments or the number of characters in the argument string. In the
> latter case, a "few thousand" argumenst could easily reach that limit.

#if defined(__arm__) || defined(__powerpc__)
#define ARG_MAX                 65536   /* max bytes for an exec function */
#define ARG_MAX                 262144  /* max bytes for an exec function */

In other words: there's no limit to the amount of arguments, but the byte 
length of the arguments.


Problem with today's modular software: they start with the modules
    and never get to the software part.

More information about the freebsd-questions mailing list