Hard links to directories: why not?
Peter da Silva
peter at ficc.ferranti.com
Thu Jul 26 23:44:42 AEST 1990
In article <1990Jul25.115628.6385 at jarvis.csri.toronto.edu> flaps at dgp.toronto.edu (Alan J Rosenthal) writes:
> Do you have a method for detecting loops which doesn't involve searching the
> whole i-list or the whole file graph?
By explicitly examining ".." you can use the standard "pwd" algorithm to
derive a canonical name for a directory. You can then compare prefixes
to determine whether a loop exists, but it would be more efficient to
check for each directory's inode while in the process of deriving the other's
canonical path.
--
Peter da Silva. `-_-'
+1 713 274 5180. 'U`
<peter at ficc.ferranti.com>
More information about the Comp.unix.wizards
mailing list