[Top] [All Lists]

Re: execve errno setting on MIPS

To: "Sadashiiv, Halesh" <>
Subject: Re: execve errno setting on MIPS
From: (Thomas Bogendoerfer)
Date: Fri, 19 Sep 2008 09:48:51 +0200
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.13 (2006-08-11)
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 


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).


Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]

<Prev in Thread] Current Thread [Next in Thread>