Bug in rm -r with locked files

Randall R Schulz rrschulz@cris.com
Thu Jan 23 19:54:00 GMT 2003


Chris J.,

At 02:47 2003-01-23, Chris January wrote:
> > It's not a completely intractable problem.  I think that someone (Chris
> > January?) provided a workaround at one point.  "cygserver" could also
> > provide a possible solution someday.
>
>The best solution, IIRC, was to move the locked files elsewhere on the same
>volume (which should be allowed) if they can't be unlinked, and then unlink
>them later. So there would be a directory of files waiting to die if you
>like :) Obviously you'd have to give them unique names, but you can just use
>random numbers.


Again, I think this misses the point. While Windows sees the file as 
open (or a directory that is current for some process), it cannot be 
renamed, relocated or deleted, can it? I know very little about the 
Windows APIs, but the behavior I see from Windows strongly suggests 
this is the case. Is there some kind of override to these common 
"interlocks" that Windows imposes? Are they only strictly enforced in 
Windows Explorer?

Randall Schulz


>Chris


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



More information about the Cygwin mailing list