Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!bellcore!faline!ulysses!hector!ekrell From: ekrell@hector..UUCP (Eduardo Krell) Newsgroups: comp.unix.wizards Subject: Re: Symbolic Links Message-ID: <2809@ulysses.homer.nj.att.com> Date: Sat, 15-Aug-87 21:08:31 EDT Article-I.D.: ulysses.2809 Posted: Sat Aug 15 21:08:31 1987 Date-Received: Sun, 16-Aug-87 12:01:19 EDT References: <8731@brl-adm.ARPA> <2789@ulysses.homer.nj.att.com> <1781@munnari.oz> Sender: daemon@ulysses.homer.nj.att.com Reply-To: ekrell@ulysses (Eduardo Krell) Organization: AT&T Bell Labs, Murray Hill Lines: 40 In article <1781@munnari.oz> kre@munnari.UUCP writes: I wrote: >> Doing it in the shell fixes the "cd /a/b; cd .." problem. But shouldn't >> "cat ../foo" be the same as "cd ..; cat foo" ?. Now, how are you going >> to do THAT in the shell?. > >Perfectly true, that should work the same both ways. There are just two >options I can see for making this (and other sensible expected semantics) >work in a consistent, repeatable, fashion. > ... > >Or leave the symlink semantics as they are in BSD (as Dennis designed >them) and stop pretending that they are links that happen to be able >to point across filesystems or to directories, and regard them as >fully fledged entities. ("Leave them" applies to the path lookup >semantics wrt ".." etc. As I have said before, I would modify some >of the other semantics a little, but all that is just gloss). But this not a solution to the problem above. You can't have it both ways. If you fix the "cd .." problem in the shell (like ksh did) and if you expect "cat ../foo" to be the same as "cd ..; cat foo", then you HAVE to do it in the kernel. There's no other way. >There's no intermediate representation that will work correctly (for >any reasonable definition of correctly) all the time. And it doesn't >matter whether the faked semantics are implemented in the shell, or >in the kernel. It doesn't work *consistently all the time*. It depends on your definition of consistency. The way BSD did symbolic links, you can't make them transparent. That is, "cd .." will move you to the physical parent instead of the logical one. You can fix that in the shell, but then the "cat ../foo" and "cd ..; cat foo" problem arises. A fix in the kernel can solve these 2 problems, but other problems appear. Eduardo Krell AT&T Bell Laboratories, Murray Hill {ihnp4,seismo,ucbvax}!ulysses!e!jrp/u