Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 09:31:48 +1000
From:      Tim Robbins <tjr@FreeBSD.org>
To:        Lukas Ertl <l.ertl@univie.ac.at>
Cc:        freebsd-standards@FreeBSD.org
Subject:   Re: standards/41576: POSIX compliance of ln(1)
Message-ID:  <20020920093148.A66405@dilbert.robbins.dropbear.id.au>
In-Reply-To: <Pine.WNT.4.44.0209192251530.652-100000@korben>; from l.ertl@univie.ac.at on Thu, Sep 19, 2002 at 10:54:35PM %2B0200
References:  <20020819210645.L310-100000@leelou.in.tern> <Pine.WNT.4.44.0209192251530.652-100000@korben>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 19, 2002 at 10:54:35PM +0200, Lukas Ertl wrote:

> On Mon, 19 Aug 2002, Lukas Ertl wrote:
> 
> > 1) $ ln -sf bar bla
> >
> > and
> >
> > 2) $ ln -sf bar bla/
> >
> > The first version should replace the symlink, the second one should create
> > a new symlink in the already referenced directory (as it currently happens
> > on FreeBSD). ln on AIX does exactly that. Of course, AIX could be
> > completely broken (as usual :-), but this is how I read the standard.
> 
> Has someone of you thought about this one since then? I have taken a look
> at the source code and AFAICS if we implement it like this we would have
> to throw out the -h option. I don't know if this would break a lot of
> things and if it would be a good idea.
> 
> What do you think about it?

I think that AIX is using lstat() on the target pathname to check whether it
exists or not - the behaviour you describe is consistent with that.

The standard says nothing explicitly about following symlinks, but I'm not
sure whether it should be implied.

The questionable sentences are these:

	If the last operand specifies an existing file of a type not
	specified by the System Interfaces volume of IEEE Std 1003.1-2001,
	the behavior is implementation-defined.

	The second synopsis form shall be assumed when the final operand
	names an existing directory.

I still don't have an answer, though...


Tim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020920093148.A66405>