public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin@cygwin.com
Cc: John William <jw2357@hotmail.com>
Subject: Re: 1.3.2 rmdir fails if CWD is in the directory to be deleted?
Date: Sat, 08 Sep 2001 04:07:00 -0000	[thread overview]
Message-ID: <20010908114532.B32405@cygbert.vinschen.de> (raw)
In-Reply-To: <20010908010137.A10788@redhat.com>

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@cygwin.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/

  reply	other threads:[~2001-09-08  4:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-07 21:45 John William
2001-09-07 22:01 ` Christopher Faylor
2001-09-08  4:07   ` Corinna Vinschen [this message]
2001-09-07 22:06 ` Randall R Schulz
2001-09-07 22:48 ` Rick Rankin
2001-09-08  6:12   ` Ronald Landheer
2001-09-08  6:53     ` Robert Collins
2001-09-09  6:14       ` Ronald Landheer
2001-09-08  7:53   ` Randall R Schulz
2001-09-09  8:49     ` Rick Rankin
2001-09-09 16:07     ` James Youngman
2001-09-09 16:40       ` Christopher Faylor
2001-09-10 10:47         ` James Youngman
2001-09-07 22:48 John William
2001-09-08  7:53 ` Randall R Schulz
2001-09-08 10:41 ` Christopher Faylor
2001-09-08 10:20 John William
2001-09-08 10:28 John William

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010908114532.B32405@cygbert.vinschen.de \
    --to=cygwin@cygwin.com \
    --cc=jw2357@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).