This is the mail archive of the
mailing list for the Cygwin project.
Re: cvs pserver issue with new cygwin packages
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:
A component of the path prefix specified by path does not name an
existing directory or path is an empty string.
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
<http://cygwin.com/ml/cygwin/2006-02/msg00175.html> 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.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.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