Path: utzoo!attcan!uunet!husc6!purdue!gatech!ukma!david From: david@ms.uky.edu (David Herron -- One of the vertebrae) Newsgroups: comp.sys.amiga Subject: ENV: variables Message-ID: <10218@s.ms.uky.edu> Date: 6 Sep 88 03:28:29 GMT Organization: U of Ky, Math. Sciences, Lexington KY Lines: 80 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). Let's ignore the implementation for a moment. The Unix method, while having some inefficiencies, has a number of features which are very useful. For instance, not all variables are exported to other processes -- allowing one to have temporary variables without worrying about other processes. For instance, the environment variables are not global to the whole system but instead to children of the process which initialized the variable -- allowing background daemons to have access to different commands than do the users, or in general to let the individual process groups specify what variables are important and what the values should be. I'm sure there are others, but these are the ones I find important. At first glance it may seem that neither of these are important in a non-multi-user machine like an Amiga. Most of the script based things which are similar to shell scripts already have a facility for local variables, and Amiga's don't often have background daemons. The 'local variables' part of the problem is 'solved' already. As for different processes needing different environment variables. There are lots of reasons for wanting to be able to do this. Suppose some package (including what I said about background daemons above) needs to have access to a set of programs which you don't want people to be running at random. You place them over in some directory. The programs in the package set up a PATH variable for themselves which includes that directory, and other people simply ignore the directory. This can be either from 'shell scripts' or from within 'real' programs. It wouldn't be 'friendly' for the package to modify the global PATH variable because this is a multi-tasking machine and you never know when the user is going to go to a CLI window to do something and get confused by a strange PATH variable. I don't particularly care how it's implemented so long as the capability is there to have different sets of environment variables for different groups of processes. You might say that since the Amiga is a single-person machine it's not going to need full-blown capabilities like we have on Unix machines. Weee-eeell.. first off, that's a ridiculous assumption as the machine *is* fairly powerful. But also the world is changing ... the other major players in the personal computer market are busily putting multi-tasking into their computers. This and the growth of data communications is going to collide into a need/desire for people to have their computers be able to do networking tasks 'in the background' while they continue to work 'in the foreground'. Much like this workstation I'm using is a fully capable internet host -- capable of supporting remote users logging into this machine, sending/receiving mail, running applications on other machines on the network, and a host of other capabilities. Probably my view is limited because I concentrate on communications in the first place. But what I said in the previous paragraph is true, people will be expecting more capabilities out of their machines as multi-tasking becomes more and more prevalent. Now, the important thing here is 1) that we not limit the generality of features present in the Amiga and 2) that 'background daemons' in general (and communications daemons in specific) tend to use wildly different command sets than the normal user does. The context for my remarks? I run the e-mail/news/bitnet/internet/uucp software for the CS/MA/STAT departments here, and have been involved in running the systems here for 4 1/2 years. I have been writing shell scripts used in 'background daemon' type functions for most of that 4 1/2 years and have quite a bit of experience in operating a system with background daemons. -- <---- David Herron -- One of the MMDF guys <---- ska: David le casse\*' {rutgers,uunet}!ukma!david, david@UKMA.BITNET <---- The owner of the talkative, blatant and period bikini is a Van Halen fan <---- I'm a Talking Heads fan ... can you say 'incompatible'?