home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5137 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.3 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ames!biosci!nntp.barrnet.net!nntp.pactel.com!eric
  2. From: eric@nit.pactel.com (Eric Pederson)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: too many values in environment
  5. Message-ID: <BzoLpJ.MAB@nit.pactel.com>
  6. Date: 22 Dec 92 22:12:55 GMT
  7. References: <BzoDt8.K3A@nit.pactel.com>
  8. Organization: Pac*Tel Corporation
  9. Lines: 21
  10.  
  11. I write:
  12.  
  13. >I am running SunOS 4.1.x and C-shell.  According to TFM, the maximum
  14. >amount of space that argv[] and envp[] may take up is returned
  15. >by sysconf(2).  On my machine the value is 1 megabyte.  However, my
  16. >shell doesn't want to accept more than 100 environment variables.
  17. >Since I am running some applications that require a zillion variables
  18. >to be set before I run them, this limitation is a pain.
  19.  
  20. >The putenv(3) library function allocates more enviromnent space using
  21. >malloc() if neccessary.  Shouldn't csh's "setenv" built-in do the same
  22. >thing?
  23.  
  24. I figured out (finally) that the program /bin/env is the one
  25. giving the message "too many values in environment".  I can indeed
  26. put much more than 100 values in my environment, but I must
  27. use the builtin "printenv" to display them, not the program "env".
  28.  
  29. -- 
  30. Eric Pederson                                       Pac*Tel Corporation
  31. eric@nit.pactel.com                                        510-210-8890
  32.