From owner-freebsd-standards Thu Sep 19 16:31:59 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DED9137B401 for ; Thu, 19 Sep 2002 16:31:57 -0700 (PDT) Received: from smtp01.iprimus.net.au (smtp01.iprimus.net.au [210.50.30.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA0C443E6A for ; Thu, 19 Sep 2002 16:31:56 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au ([210.50.41.168]) by smtp01.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.4617); Fri, 20 Sep 2002 09:31:54 +1000 Received: from dilbert.robbins.dropbear.id.au (k8y4paszc2uyb0nc@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id g8JNVpCj067452; Fri, 20 Sep 2002 09:31:52 +1000 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id g8JNVn9Z067450; Fri, 20 Sep 2002 09:31:49 +1000 (EST) (envelope-from tim) Date: Fri, 20 Sep 2002 09:31:48 +1000 From: Tim Robbins To: Lukas Ertl Cc: freebsd-standards@FreeBSD.org Subject: Re: standards/41576: POSIX compliance of ln(1) Message-ID: <20020920093148.A66405@dilbert.robbins.dropbear.id.au> References: <20020819210645.L310-100000@leelou.in.tern> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from l.ertl@univie.ac.at on Thu, Sep 19, 2002 at 10:54:35PM +0200 X-OriginalArrivalTime: 19 Sep 2002 23:31:54.0752 (UTC) FILETIME=[BD229000:01C26034] Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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