strange interaction between open and cwd

Grant Edwards invalid at invalid.invalid
Tue May 4 10:55:52 EDT 2010


On 2010-05-04, Gregory Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Grant Edwards 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,

I know that used to be the case in SunOS (as I found out the hard
way), but I've been told by Solaris experts that it is no longer
allowed.  I was also under the impression that it wasn't allowed in
Linux, but I've never tried it.

According the the Linux ln (1) man page:

   -d, -F, --directory

      allow the superuser to attempt to hard link directories (note:
      will probably fail due to system restrictions, even for the
      superuser)
              
> 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).

It sure caused trouble when I did it on a SunOS system back in the day
(1990 or thereabouts).

-- 
Grant Edwards               grant.b.edwards        Yow! I feel like I'm
                                  at               in a Toilet Bowl with a
                              gmail.com            thumbtack in my forehead!!



More information about the Python-list mailing list