This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rm problem: Directory not empty


"James R. Phillips" wrote:

> Isn't this issue a potential problem with any multitasking OS ?  If there is a
> windows-specific feature to this issue, I am not aware of it.

In *nix, you can successfully unlink an open file.  Its directory entry
will be removed but its inode will remain until all open handles are
closed.  Any programs still using the file will continue to do so
obliviously, until the last open handle is closed at which point the
inode is deleted and the file is actually gone.  This allows the system
to e.g. replace in-use libraries and then just restart any services that
were using that library.

In windows, a file cannot be deleted until all outstanding file handles
are closed.  I think there is an option you can give to the system to
tell it to delete the file for you when all handles are closed, but this
still does not allow for the above behavior where you can actually
replace an in-use file with a new one.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]