delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/03/23:44:37

X-Spam-Check-By: sourceware.org
Date: Fri, 3 Feb 2006 23:44:22 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: =?ISO-8859-15?Q?Sven_K=F6hler?= <skoehler AT upb DOT de>
cc: cygwin AT cygwin DOT com
Subject: Re: cvs is broken/cygwin-bug in mkdir()?
In-Reply-To: <ds158s$vfk$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.63.0602032230020.3425@access1.cims.nyu.edu>
References: <ds158s$vfk$1 AT sea DOT gmane DOT org>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

---559023410-1932422408-1139026935=:3425
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-ID: <Pine DOT GSO DOT 4 DOT 63 DOT 0602032335081 DOT 3425 AT access1 DOT cims DOT nyu DOT edu>

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 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"

---559023410-1932422408-1139026935=:3425
Content-Type: text/plain; charset=us-ascii

--
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/
---559023410-1932422408-1139026935=:3425--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019