bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: execve E2BIG (Argument list too long)


From: Ilkka Virta
Subject: Re: execve E2BIG (Argument list too long)
Date: Wed, 30 Sep 2020 18:11:05 +0300

On Wed, Sep 30, 2020 at 5:53 PM Michael Green <green@strato.de> wrote:

> The included short script when run with the following command results
> in execve "E2BIG (Argument list too long) errors".
>
> * The number of arguments can be tuned down to "seq 1 23694" and it
> still occurs, but any lower and it disappears.
>

That sounds a lot like the 128 kB hard limit Linux puts on the size of a
single argument to exec. (I know it counts for command line arguments, I
expect it also counts for env variables. They're passed in pretty much the
same way anyway.)

seq 1 23694 | wc  gives 131058, just a bit less than 131072. Add the
variable name and it goes over. Workaround: use another OS, or pass big
data like that in files.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]