Roman Bolshakov wrote: > But then we will need to correct calculation of VC_ARG_MAX. We can take > formulae from [2]: > expr `getconf ARG_MAX` - `env|wc -c` - `env|egrep '^[^ ]+='|wc -l` \* 4 - 2048
This formula assumes that a pointer in the 'environ' array is 4 bytes long. On 64-bit platforms it surely is 8 bytes long. More generally, I find this formula too fragile. It assumes so many things. I would prefer a formula which does not attempt to produce the highest possible value, but makes less assumptions. How about expr `getconf ARG_MAX` / 2 ? Bruno