This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: rm behaviour when file in use by Windows app?
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com, L dot Wood at surrey dot ac dot uk
- Date: Mon, 01 Sep 2008 06:14:46 -0600
- Subject: Re: rm behaviour when file in use by Windows app?
- References: <F3F03716-CA1D-41DB-9567-24492F108682@surrey.ac.uk>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Lloyd Wood on 9/1/2008 4:29 AM:
> but as foo.pdf is already open in the Windows Acrobat reader, nothing
> happens. No error message is given. If I ls, I can still see foo.pdf.
>
> Later, I close foo.pdf in Reader. foo.pdf then immediately and silently
> vanishes from the file system.
Yes, this is Window's semantics for file deletion, when the file is
currently open.
>
> I'm having trouble understanding what happens here. Does the rm for
> foo.pdf get queued up somewhere, but is blocked by Acrobat's use? Is
> this the most sensible behaviour?
No less sensible than any of Microsoft's other implementation decisions.
Cygwin 1.7.0 will go to greater lengths to try to hide this wart, by
moving open files to the recycle bin so that ls no longer sees an unlinked
file, and so that rmdir no longer complains about non-empty directories,
so that the behavior is closer to Linux. But it is just that -
workarounds to a different implementation, due to a different OS.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAki73LYACgkQ84KuGfSFAYA7rQCfQBiq/IbFuIC/uCunOKY8cYUJ
Pv0AoNPV8NviaYEQgJfg4hh89Z3Zhpcv
=wSfP
-----END PGP SIGNATURE-----
--
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/