Markus Neteler wrote: > On Wed, Sep 24, 2008 at 5:04 PM, Daniel Victoria > <[EMAIL PROTECTED]> wrote: > > I've bumped into this problem before, with the same error, but outside > > GRASS. Which shows that this is not a GRASS bug but a limitation of > > the operating system. > > AFAIK, to find the limit, you can run (file is from glibc-devel): > > grep ARG_MAX /usr/include/linux/limits.h > #define ARG_MAX 131072 /* # bytes of args + environ for exec() */
It's more robust to use sysconf(_SC_ARG_MAX), as the limit isn't necessarily fixed at compile time (e.g. it can vary between kernel versions). Also, the limit is divided between argv[] and the environment. If you have a lot of space taken up by environment variables, it will eat into the space available. This can be significant on older systems, where the limit may be as low as 4KiB (a single page of memory). -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
