[comp.unix.questions] Environment size question

jockc@killer.UUCP (Jock Cooper) (07/07/88)

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).

jockc

ihnp4!killer!jockc

wescott@sauron.Columbia.NCR.COM (Mike Wescott) (07/08/88)

In article <4717@killer.UUCP> jockc@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@ncrcae.Columbia.NCR.COM