ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/09/02/01:55:49

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10209020554.AA22904@clio.rice.edu>
Subject: Re: Two rm.exe issues on XP
To: acottrel AT ihug DOT com DOT au (Andrew Cottrell)
Date: Mon, 2 Sep 2002 00:54:52 -0500 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <003a01c2517e$a2cae410$0100a8c0@p4> from "Andrew Cottrell" at Sep 01, 2002 04:12:31 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> > > PROBLEM 2 - RM.EXE Operation not permitted (EPERM)
> >
> > > DJGPP_204 C:\dj204\gnu\build.gcc\gcc>rm -rf include
> > > rm: cannot remove directory `include': Operation not permitted (EPERM)
> 
> I suspect that once the fist bug is fixed then the second one may also be
> fixed, but then again.....

I have now seen this bug, and I know the problem.

The cvs rm.exe changes directory into the tree, then aborts in the assert,
which doesn't change the directory back.  So the NTVDM has it's current
directory in the tree, and you can't delete it.  If I kill NTVDM then
I can delete the directory with no EPERM message.  When I saw this 
error, I could not delete the directory with Win2K's RMDIR either.

So this is a side effect of the rm aborts, but not really a separate bug
(at least not one we can fix).  You can't delete a directory if there
is a process with a current working directory there.  Changing directories
in DOS is dangerous (not volatile like unix).

When you see this sort of thing, kill all NTVDMs and try again.

- Raw text -


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