Magic symlink syntax

David Elliott dce at mips.COM
Sun Jun 19 00:42:15 AEST 1988


In article <126 at vertical.oz> greg at vertical.oz (Greg Bond) writes:
>In article <2371 at quacky.mips.COM> dce at mips.COM (David Elliott) writes:
>>This is the modification that allows one to put a variable inside of
>>a symbolic link target so that people can choose default execution
>>"universes" or "modes" or "system types".
>
>What do you mean by a variable?  How can such variables be set up so
>that the kernel context can access them?  Not shell variables,
>obviously (as the process doing the system call is not in general a
>shell), but even "environment" variables can be changed by the process
>and I can't see how namei would know where to look for them.

It really doesn't matter what kind of variable.  Even the Pyramid
"universe" is a kind of variable; it's just restricted to two values.

My original description is quite restrictive, as it states that it
allows people to choose default execution "universes".

With this restriction, it's quite easy to set it up so that the
value of the variable gets passed to the kernel.  The system call
wrapper could simply decode the current value of an environment
variable and pass it to the kernel.

A variation of this is to have the system call interface send the
environment pointer to the kernel.  You can send pointers to other
types of objects, why not the environment?

Another option is to say that the "variable" is set by a system
call, as the umask or the nice value is.

Obviously, the first two methods can cost extra time, so care must
be taken to understand how to do it.  The thing to remember is that
we (meaning the company developing the system) owns the system call
interface, so we can modify it as needed.

-- 
David Elliott		dce at mips.com  or  {ames,prls,pyramid,decwrl}!mips!dce



More information about the Comp.unix.wizards mailing list