X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 6 Mar 2008 16:32:52 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: bug with touch t/ Message-ID: <20080306153252.GW18407@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <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> <20080306152705 DOT GU18407 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080306152705.GU18407@calimero.vinschen.de> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 6 16:27, Corinna Vinschen wrote: > On Mar 6 14:56, Eric Blake wrote: > > Corinna Vinschen 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. > > In our case I added a special case to emit EISDIR, otherwise we would > get ENOENT automatically (that's what STATUS_OBJECT_NAME_INVALID gets > converted to). However, I'm somewhat puzzled that you used that bash > example: > > $ : > t/ > bash: t/: Is a directory. > > If what you said is right, and if I revert the change to fhandler.cc, > we would get a ENOENT in that case, too. And given your arguments, > that should be correct. > > Do you agree? I should add that I'm still rather leaning towards the Linux behaviour. I tested this on Solaris 10, and it behaves again different. In both examples open(2) returns with ENOTDIR. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/