This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: 1.3.2 rmdir fails if CWD is in the directory to be deleted?
- To: John William <jw2357 at hotmail dot com>, cygwin at cygwin dot com
- Subject: Re: 1.3.2 rmdir fails if CWD is in the directory to be deleted?
- From: Rick Rankin <rick_rankin at yahoo dot com>
- Date: Fri, 7 Sep 2001 22:48:57 -0700 (PDT)
Hmm. It looks to me like this should fail, even under Unix. Once you've chdir'd
into test, it no longer exists at the current directory level. Shouldn't the
sequence be
mkdir("test");
chdir("test");
rmdir("../test");
Of course, even this will fail under Windows because Windows won't allow the
current directory to be deleted if it's in use by any process.
--Rick
--- John William <jw2357@hotmail.com> 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
> }
>
> 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!
>
> - John
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> 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/
>
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
--
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/