Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!umd5.umd.edu!roissy.umd.edu!mark From: mark@roissy.umd.edu (Mark Sienkiewicz) Newsgroups: comp.os.386bsd.development Subject: Re: A challenge to all true hackers: objects and types Date: 25 Mar 1993 16:02:51 GMT Organization: University of Maryland Lines: 42 Message-ID: <1osl3b$8vl@umd5.umd.edu> References: <JKH.93Mar20153113@whisker.lotus.ie> <ARNEJ.93Mar24113744@chanur.imf.unit.no> <C4FEo2.8no@sugar.neosoft.com> NNTP-Posting-Host: roissy.umd.edu In article <C4FEo2.8no@sugar.neosoft.com> peter@NeoSoft.com (Peter da Silva) writes: >In article <ARNEJ.93Mar24113744@chanur.imf.unit.no> arnej@imf.unit.no (Arne Henrik Juul) writes: >> I also think that variant links using environment variables is a BAD >> idea. > >I think that's a reasonable conclusion. How about variant links using >some other set of per-process/per-uid symbolic name space? Using environment variables is a BAD idea for this reason: Environment variables do not exist. They are a fiction that is maintained by the user level programs. The kernel does not maintain them. They are an array of strings that are stored _somewhere_ in the user process, but they are entirely under the control of the user process. The kernel can't even be sure it can find them. Hewlett Packard has an interesting feature that was mentioned at the beginning of this discussion. It is "Context Dependent Files". A CDF is essentially invisible. When you access the directory, you don't get the directory, but you get a file _within_ the directory. Which file is based on your "context". Your context is a set of strings that the kernel carries around for you. When you access a CDF, the kernel searches for a file that matches a string in your context. A weakness of the HP implementation is that you can't add new strings to your context. (Or maybe the weakness is the documentation sucks... :) We would not have to follow that, of course. Typically, what you do with HP contexts is make directories to share among different system configurations. e.g. /usr/bin is a CDF which contains /usr/bin/mc68020 and /usr/bin/HP-PA. If I'm on a 68K based machine, I look in /usr/bin and see 68k executables. If I'm on an PA-RISC machine, I see PA-RISC executables. If you could add your own strings to the context, you could do anything that you could do with environment variables in symbolic links. Mark S.