Re: [Help-bash] What affects the number of arguments allowed?
From:
Eric Blake
Subject:
Re: [Help-bash] What affects the number of arguments allowed?
Date:
Mon, 10 Dec 2018 21:00:38 -0600
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1
On 12/10/18 7:47 PM, Peng Yu wrote:
Hi,
The following test case runs differently on different terminals
(tested on Mac OS X). Sometimes, it fails sometimes, it does not.
Somebody says it is determined by kern.argmax Mac OS X. There are
obviously other factors affecting the limit.
Yes, the size of the environment variables often affects the limits
(although the effect may depend on your operating system). That is, on
a single system, if the kernel shares the storage used for sharing argv
and environ from a parent process to its child, then having more (or
longer) variables defined in the environment reduces the amount of space
remaining for command line arguments.