Path: utzoo!attcan!uunet!cbmvax!rutgers!mailrus!ames!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: ENV: variables Message-ID: <8809070041.AA11163@cory.Berkeley.EDU> Date: 7 Sep 88 00:41:11 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 51 :There has been recent discussion of the ENV: stuff in 1.3 ... : :One of the things which has really hit a nerve with me is Matt saying :that he really doesn't like Environment variables as implemented in :Unix. (As I recall, he also doesn't like the fork()/exec() split ... :but I'm going only going to talk about environment variables). Uh oh! Well, let me put it this way. Please keep the perspective that this is an AMIGA, *NOT* a large multi-user UNIX system. You can't just keep a million copies of a possibly huge enviroment set lying around in memory now can you! (1) One might want it to be the same globally (2) One might want it to be the same for a particular login shell and programs running under that shell (3) One might want a private copy for a particular running process -- Now on UNIX, all enviroment variables are private and can only be propogated to children. I.E. (3). There is no way to change the enviroment variables associated with already-running processes unless that process does it itself. Now do a printenv on your machine... how many of these variables are the same for all possible logins to your account? Here I am NOT talking about user-independance... the Amiga is more a single-user machine then anything else, even more so then the workstation class. In my enviroment I count about 12 out of 16. The ones that might change are, for instance, the terminal type and termcap, and these do not have much of a bearing on the Amiga. Private variables on the Amiga? YOU BET! Damn right, a requirement... but not necessarily implemented by the enviroment variable's domain... more like local shell variables. Passing a specific variable to a program where the program might already be running 'in another window' where you WANT the variable to be different? Well, this situation can certainly come up (I have yet to be in such a situation). Again, the fact that the Amiga is not a multi-user systems saves us. setenv var #1, run program, setenv var #2, run program, which assumes that the program reads the enviroment variable at startup (most will). And if you *really* want private enviroment variables simply make a sub-directory in ENV: ... but the program(s) would have to support it. -Matt