Email List: Xaustin-group-lX
[All Lists]

Re: link(2) and symlinks

To: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Re: link(2) and symlinks
From: Paul Eggert <yyyyyy@xxxxxxxxxxx>
Date: Wed, 16 Mar 2005 23:50:10 -0800
References: <42383B12.7050203@byu.net><20050316145244.GA2516@maildrop.rdg.opengroup.org><200503161726.j2GHQdVm012524@khavrinen.lcs.mit.edu>
Garrett Wollman <yyyyyyy@xxxxxxxxxxxxxxxxxxxxx> writes:

> So, we decided to return to the original behavior,

Except you no longer allow programs to create hard links to symbolic
links, right?  If modern *BSD link(a,b) follows symbolic links,
there's no way to create a hard link to a symlink, and the link count
of a symbolic link is always 1.

So (unless I'm missing something) in this particular detail *BSD has
stuck with POSIX rather than the traditional Unix behavior as
supported by the Solaris default environment and by GNU/Linux.

> I believe (those who were there can correct me if I'm wrong) that the
> intent of the original specification was to allow both traditional
> Unix implementations, which stored symbolic links in special files,
> and other implementations which treated symbolic links as special
> directory entries.

If that was the intent, then the POSIX specification for link()
doesn't capture it, since the spec currently disallows the traditional
Unix implementation of link() that allows hard links to symlinks.

Was it intended that POSIX disallow traditional Unix implementation
behavior here?  I don't see anything in the rationale about this.

<Prev in Thread] Current Thread [Next in Thread>