delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/03/06/09:57:28

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Blake <ebb9 AT byu DOT net>
Subject: Re: bug with touch t/
Date: Thu, 6 Mar 2008 14:56:09 +0000 (UTC)
Lines: 36
Message-ID: <loom.20080306T144346-788@post.gmane.org>
References: <loom DOT 20080304T214047-23 AT post DOT gmane DOT org> <20080305183640 DOT GI18407 AT calimero DOT vinschen DOT de> <47CFEE38 DOT 5040905 AT byu DOT net> <20080306132748 DOT GP18407 AT calimero DOT vinschen DOT de> <47CFF263 DOT 90804 AT byu DOT net> <20080306134546 DOT GQ18407 AT calimero DOT vinschen DOT de> <47CFF979 DOT 6080201 AT byu DOT net> <20080306142614 DOT GR18407 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:

> 
> But the flags are not O_RDONLY|O_CREAT.  They are O_WRONLY|O_CREAT.

I still think Linux is wrong - t/ is not an existing directory, so you can't 
claim that an attempt was made to open an existing directory with O_WRONLY.  
But I guess it is a bit ambiguous, since if t/ did exist, then opening t/. 
should indeed fail with EISDIR; at any rate, it is certainly more efficient to 
blindly reject O_WRONLY due to the trailing slash without even checking for the 
existence of t.

> That's why this falls under EISDIR under SUSv3 rules, afaics.

Maybe it's worth asking the Austin Group for clarification?  I already asked 
about Linux's decision to make rename("symlink-to-dir/","other") and rmdir
("symlink-to-dir/") both fail with ENOTDIR, even though POSIX states those 
should succeed (by operating on the underlying dir and leaving symlink-to-dir 
dangling), but the Austin group shot that down by claiming that Linux is buggy 
for using that particular errno and should be using something like ENOTSUP 
instead.

> 
> Which chapter in the austin doc are you refering to?  I can't find
> this re-wording for some reason.

The rewording for path resolution is in section XBD 4.12 (page 109 in draft 4 
of the 200x spec).  You have to use your Austin login to download the draft.  
Draft 5 will be coming out soon, and the goal is to finalize the formal release 
of POSIX 200x by the end of this year (probably calling it POSIX 2008).  But 
you can also see publicly this particular rewording in the Interp against POSIX 
2001: https://www.opengroup.org/austin/interps/uploads/40/4059/AI-016.txt

-- 
Eric Blake



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019