On Fri, Sep 19, 2008 at 08:57:17AM +0530, Sadashiiv, Halesh wrote: > >And it looks like the ARG_MAX limit is bigger than my installed glibc > >thinks, because it works at least on x86. When I increase the array two > >2 * ARG_MAX I'll get the wanted E2BIG. > > Yes, on MIPS we need to increase the ARM_MAX to 2*ARG_MAX to get E2BIG. I've tested only on x86 and I also needed to use 2 * ARG_MAX. This all depends on the installed glibc, which provides ARG_MAX and the installed kernel, which sets the rules independand from glibc. If you look at fs/exec.c in the kernel source, you see these rules. Current kernels for example have a limit of #define MAX_ARG_STRINGS 0x7FFFFFFF for the number of strings. Looks like E2BIG is triggered by the space needed for the strings (I only had a quick look at exec.c). Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ]