3 ms·
No, bash doesn't and didn't have its own limit. On an ancient system (Debian Sarge), ARG_MAX=131072: $ bash --version GNU bash, version 2.05b.0(1)-rele
by derobert 15y ago
No, bash doesn't and didn't have its own limit. On an ancient system (Debian Sarge), ARG_MAX=131072:
$ bash --version
GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
$ strace bash -c '/bin/echo `seq 1 30000`' 2>&1 | grep exec
execve("/bin/bash", ["bash", "-c", "/bin/echo `seq 1 30000`"], …) = 0
execve("/bin/echo", ["/bin/echo", "1", …) = -1 E2BIG (Argument list too long)
As you can see, the argument list too long error came back from the
execve syscall, i.e., from the kernel. (Note that I shortened the strace output to make it fit the page)