Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!oddjob!gargoyle!att!pacbell!well!shf From: shf@well.UUCP (Stuart H. Ferguson) Newsgroups: comp.sys.amiga Subject: Re: Enviroment (was Re: Yea, but can an Amiga Shell do this....) Message-ID: <6890@well.UUCP> Date: 22 Aug 88 19:49:46 GMT References: <8808220455.AA27577@cory.Berkeley.EDU> Reply-To: shf@well.UUCP (Stuart H. Ferguson) Organization: The Blue Planet Lines: 49 From: dillon@CORY.BERKELEY.EDU (Matt Dillon) | :How does this allow a child to have an environment different from its | :parent? Specifically [specific example tree deleted] | It doesn't, [...] There is a way to do it, which is to have a subdirectory for each process in the tree. When a child process looks for a given context variable, it looks in its own subdirectory first, then, if it doesn't find the given variable, it looks in its parent's directory and so on. This gives inheritance behavior using a file-structured device and without duplication of data. There are a couple of added advantages to this method over the SetEnv interface. You can modify the context variables for a different process by changing files in its subdirectory. Also, subdirectories could stick around after the process exits so that when the same process starts up again, it goes back to having its context set up the way it was last time. | ... in | fact, none of the environment is in memory if you assign ENV: to your floppy | or hard disk. Having "environment" variables on recoverable media such as floppy or hard-disk or even rrd is really great since you don't need to do a long series of SetEnv commands in your startup, you can just do one Assign and your environment is the way you want it. Also, every change to your environment does not require editing your startup sequence; you just change the ENV: directory and the change is made permanently. It might be nice, however, to have an environment search path, so that permanent environment vars could be set up on hard disk, and temporary changes for the current shell could live on RAM:. Just an idea. | Neither are there limitations to the environment size... | Individual environment variables can theoretically hold entire file's worth | of data. The only plausable assumption one can really make is that | environment variables contain ASCII (can we even do that?). Why impose that constraint? IFF would be nice for ENV: files such as Workbench-Backdrop and Guru-Sound. :-) | -Matt -- Stuart Ferguson (shf@well.UUCP) Action by HAVOC (shf@Solar.Stanford.EDU)