strange interaction between open and cwd

Nobody nobody at nowhere.com
Tue May 4 09:39:04 EDT 2010


On Tue, 04 May 2010 20:08:36 +1200, Gregory Ewing wrote:

>> except that Python objects can form a generalized graph, and Unix
>> filesystems are constrained to be a tree.
> 
> Actually I believe that root is allowed to create arbitrary hard links to
> directories in Unix, so it's possible to turn the file system in to a
> general graph. It's highly unrecommended, though, because it confuses the
> heck out of programs that recursively traverse directories (which is why
> only root is allowed to do it).

The 1980s are over already ;)

I don't know of any modern Unix which allows creating additional hard
links to directories (even for root). It creates too many problems, and
isn't necessary if you have symlinks.

If you want to turn the filesystem into a cyclic graph, you typically need
to bypass the kernel's filesystem interface and modify the block device
directly (e.g. with debugfs). If fsck finds out, it's likely to fix it.




More information about the Python-list mailing list