delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/08/07:07:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 8 Sep 2001 11:45:32 +0200
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: John William <jw2357 AT hotmail DOT com>
Subject: Re: 1.3.2 rmdir fails if CWD is in the directory to be deleted?
Message-ID: <20010908114532.B32405@cygbert.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com, John William <jw2357 AT hotmail DOT com>
References: <F146hlbgwCpsCXsCLMy0000ad06 AT hotmail DOT com> <20010908010137 DOT A10788 AT redhat DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <20010908010137.A10788@redhat.com>; from cygwin@cygwin.com on Sat, Sep 08, 2001 at 01:01:37AM -0400

On Sat, Sep 08, 2001 at 01:01:37AM -0400, Christopher Faylor wrote:
> On Sat, Sep 08, 2001 at 04:45:24AM +0000, John William wrote:
> >I just installed Cygwin and am having the following problem with rmdir() -- 
> >it fails if the CWD is set to the directory to be deleted.
> >
> >main()
> >{
> > mkdir("test");
> > rmdir("test"); <-- succeeds
> >
> > mkdir("test");
> > chdir("test");
> > rmdir("test"); <-- fails
> >}

BTW, the above can't work on _any_ system.  After creating a dir `test'
and then chdir'ing into that directory, it's very unlikely that there's
another subdirectory `test' in `test'...

Corinna

> >
> >This is different than standard UN*X. It appears to me that POSIX only 
> >requires that the directory be empty, it doesn't say that the CWD can't be 
> >set to the directory to be deleted.
> >
> >Is this a known issue? It is causing problems with some programs I'm trying 
> >to compile (they work fine under RH Linux, DJGPP and FreeBSD). Please e-mail 
> >any reponses, as I am not subscribed to the mailing list. Thanks!
> 
> Welcome to Windows.  If Windows can't delete a directory while it is the
> current directory of some process then there is no way that Cygwin can
> do this either.
> 
> The Single Unix Specification does seem to imply that deleting the current
> working directory should succeed but there are some UNIX systems out there
> that don't adhere to this.  For instance, I just tried this on IRIX 5.3
> and it failed to rmdir a directory if I was cd'ed to it.
> 
> cgf
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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