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

Changes between Version 8 and Version 9 of DiffFromUnix


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

Add a few words on the dot-dot resolution

Legend:

Unmodified
Added
Removed
Modified
  • DiffFromUnix

    v8 v9  
    99== Running in background ==
    1010
    11 When you run a command in the shell, the starts the command and waits for it to terminate / return exit status. In UN*X a process that wants to return control to the parent shell and continue running in the background (typically a daemon) does a fork(), the parent immediately exits (thus returning exit status) and the child continues running. In HelenOS there is no `fork()`. Instead it is possible for a task to return status to the caller ''without exiting''. A HelenOS server usually initializes and registers itself with some naming service, then it calls `task_retval()` which returns status to the caller (effectively returning command line to the user) without terminating the task. After that the server usually enters the main message loop.
     11When you run a command in the shell, it starts the command and waits for it to terminate / return exit status. In UN*X a process that wants to return control to the parent shell and continue running in the background (typically a daemon) does a fork(), the parent immediately exits (thus returning exit status) and the child continues running. In HelenOS there is no `fork()`. Instead it is possible for a task to return status to the caller ''without exiting''. A HelenOS server usually initializes and registers itself with some naming service, then it calls `task_retval()` which returns status to the caller (effectively returning command line to the user) without terminating the task. After that the server usually enters the main message loop.
    1212
    1313== No signals ==
     
    1919== Lexical dot-dot resolution ==
    2020
    21 To Be Written.
     21When 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.
     22
     23Lexical 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:
     24
     25{{{
     26}}}
    2227
    2328== No serial terminals ==