This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug with touch t/

Corinna Vinschen <corinna-cygwin <at>> 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 

> 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 

Eric Blake

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]