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: cvs is broken/cygwin-bug in mkdir()?


On Sat, 4 Feb 2006, Sven Köhler wrote:

> i'm trying to use cygwin's cvs in server-mode for another application
> I get the following error, but on a linux-system, everything is fine!
>
>   E cannot mkdir /tmp/cvs-serv784/.
>   error  No such file or directory

As Brian said, this was already reported.  The ball is now in the CVS
maintainer's court: <http://cygwin.com/ml/cygwin/2006-01/msg01383.html>.

> Of course, cvs isn't using the mkdir command i guess, but it's using
> some mkdir()-call and i guess that cygwin returns the wrong return-code
> and actually cvs would ignore the "file exists" error-code, but it gets
> the "no such file or directory" error-code.
> So that results in a broken cvs :-(

That's exactly right (see line 1002 of server.c).

> Is this a bug in cygwin?

Yes.  Looks like Cygwin is too hasty in assigning the error number: Linux
only returns ENOENT if the directory doesn't already exist, but Cygwin
will always return it for a trailing dot argument.  The same with rmdir,
where it would always return EINVAL, even if the directory doesn't exist
(in which case Linux returns ENOENT).  FWIW, POSIX only specifies an
action for rmdir() on a trailing dot (EINVAL).

I didn't post earlier because I was trying to test a patch (a variant of
CGF's, though his is cleaner).  I'm glad this is fixed.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.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/

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