X-Spam-Check-By: sourceware.org Date: Thu, 11 May 2006 10:14:40 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Charles Wilson cc: cygwin AT cygwin DOT com Subject: Re: cvs pserver issue with new cygwin packages In-Reply-To: <4462BADD.6060504@cwilson.fastmail.fm> Message-ID: References: <051020061912 DOT 15752 DOT 44623B370003AC8000003D8822007613940A050E040D0C079D0A AT comcast DOT net> <4462BADD DOT 6060504 AT cwilson DOT fastmail DOT fm> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk 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 Thu, 11 May 2006, Charles Wilson wrote: > Eric Blake wrote: > > > > $ cvs co test > > > > cannot mkdir /tmp/cvs-serv3172/. > > > > No such file or directory > > > This was a bug in Cygwin 1.5.19, which returned the wrong error code for > > > creating this directory, and CVS didn't know to ignore it. Try a > > > snapshot. > > > > It wasn't the 'wrong' errno, so much as a different errno than Linux > > used in the same situation, and a bug that still exists in CVS for > > blindly assuming that only the Linux errno will be used even on > > non-Linux platforms. POSIX allows any number of errno > > returns when more than one simultaneous error condition exists. > > Well now. That's news to me. I thought it WAS a pure cygwin bug, not a > misinterpretation of POSIX by the cvs guys. After folks discovered the > errno issue and it was "fixed" in the cygwin snapshots, I said "I don't > want to clutter up the cvs sourcecode with a workaround for a bug that's > already fixed. We'll just wait for cygwin-1.5.20" There was some analysis of this back in February. The problem was that Cygwin's behavior was contrary to POSIX. POSIX states: The mkdir() function shall fail if: [ENOENT] A component of the path prefix specified by path does not name an existing directory or path is an empty string. [EEXIST] The named file exists. Cygwin set errno to ENOENT for somedir/., even if somedir existed. This was just plain wrong (i.e., nothing in the above allows such behavior). > Given Eric's explanation, that was the wrong decision. Given the > controversy over cvs-1.11.21, I'll release an update of cvs-1.11.17 with > a workaround for this...difference of opinion? as soon as I can. Which > would be sooner if someone sent me a P to TC. Chuck, the problem with adding a workaround is that there may be a legitimate ENOENT (e.g., you call mkdir("/path/to/somedir/."), and "/path" doesn't exist). So, even the hack you proposed in will not work... The only safe (but very inefficient) fix is to test every path component, and ignore ENOENT only if all of them exist. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- 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/