Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes between Version 9 and Version 10 of DiffFromUnix


Ignore:
Timestamp:
2013-03-28T13:27:45Z (6 years ago)
Author:
Jakub Jermář
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DiffFromUnix

    v9 v10  
    2121When the HelenOS file system layer sees a reference to '.' (current directory) or '..' (parent directory) in a file system path, it does not resolve it by traversing through the corresponding special directory entries, but rather makes use of its knowledge of the used absolute paths. Upon accepting the path from the user, HelenOS resolves references to '.' and '..' lexically by leaving out all occurrences of '.' and 'component/..' from the path. This represents a simplification of individual file system servers and allows file systems that do not explicitly understand the notion of the current and the parent directory in their directory entries to be supported.
    2222
    23 Lexical dot-dot resolution removes the potential for an ambiguous behavior when the child directory is entered using alternate paths (eg. via a symlink) and the user then goes back to the parent directory using dot-dot. This problem is inherent to UNIX-like systems and, if not dealt with by the shell, the following scenario is possible:
     23Lexical dot-dot resolution removes the potential for an ambiguous behaviour when the child directory is entered using an alternate path. This ambiguity is inherent to UNIX-like systems and, if not dealt with by the shell, the following scenario is possible:
    2424
    2525{{{
     26[jermar@gorgo tmp]$ mkdir -p foo/bar/foobar
     27[jermar@gorgo tmp]$ ln -s foo/bar bar2
     28[jermar@gorgo tmp]$ csh
     29[jermar@gorgo /tmp]$ cd bar2
     30
     31[jermar@gorgo bar2]$ cd ../bar2
     32../bar2: No such file or directory.
     33[jermar@gorgo bar2]$ pwd
     34/tmp/foo/bar
     35}}}
     36
     37With lexical dot-dot resolution we see the following `bash` session output:
     38
     39{{{
     40[jermar@gorgo tmp]$ bash
     41[jermar@gorgo tmp]$ cd bar2
     42[jermar@gorgo bar2]$ cd ../bar2
     43[jermar@gorgo bar2]$ pwd
     44/tmp/bar2
    2645}}}
    2746