Mail Archives: cygwin/2003/01/23/11:23:21
On Thu, 23 Jan 2003, Randall R Schulz wrote:
> 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
Randall,
These "interlocks", at least as far as renaming goes, might in fact be
restricted to Windows Explorer. It seems possible (from the limited
testing that I did) to rename a file that is locked, or move it to another
directory on the same volume. If I may venture a guess, Windows Explorer
is unable to move a locked file because it implements move as copy/delete
to avoid special-casing for same-volume moves.
I've had a similar problem with cvs trying to remove lock directories on
samba drives. While not necessarily related (I had no infinite loops,
just a "permission denied" on remove), I was able to rename or even move
the directory (while it was considered locked), as long as it was on the
same volume.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
--
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 -