Symlinks and ..

Randal Schwartz merlyn at iwarp.intel.com
Tue Nov 28 06:58:55 AEST 1989


In article <12407 at ulysses.homer.nj.att.com>, ekrell at hector (Eduardo Krell) writes:
| ".." should be treated as a logical operator that moves you one level
| closer to the root by stripping the last component off your current
| working directory (which is whatever path you used to get to where
| you are). This preserves the "/usr/foo/bar/.. == /usr/foo" paradigm.
| 
| Besides, this is the only sensible interpreation of ".." on implementations
| where ".." does not exist physically as a directory entry (which is
| not required by POSIX).

Well, let's take a look at that.  Current unicies do not maintain a
path to the current working directory... just a handle on the inode.
Do you propose maintaining a real path throughout all chdir(2) calls?
What if a portion of the path gets renamed?  Does the path become
invalid?  (a new errno error: ECWDGONE == "The current directory is no
longer valid".)

Nope.  ".." will probably mean what it means for a real long time. :-)

Just another UNIX hacker,
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III  |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/



More information about the Comp.unix.questions mailing list