Environment size question

Mike Wescott wescott at sauron.Columbia.NCR.COM
Fri Jul 8 03:13:27 AEST 1988


In article <4717 at killer.UUCP> jockc at killer.UUCP (Jock Cooper) writes:
> Is there a way to increase the size of the environment variable table?
> My implementation allows only 100, and I need more.
> 
> I'm running /bin/sh on an NCR Tower 32 (SysV).

There is no limit in your /bin/sh for 100 environment variables.  The
only limit on the environment is the total size of the arg list plus the
environment must be less than 5120 bytes or else the shell will complain
that the arg list is too long and refuse to exec your command.  This is not
a /bin/sh limit but a kernel limit.

The limit of 100 is real.  It's in /bin/env and not the shell.  env also
screws up when printing the environment, not handling the case of exactly
100 variables correctly.  It'll print the garbage "after" the 100th variable.
-- 
	-Mike Wescott
	 wescott at ncrcae.Columbia.NCR.COM



More information about the Comp.unix.questions mailing list