Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Subject: Re: Bug in rm -r with locked files From: David Means To: Gael Mulat Cc: cygwin AT cygwin DOT com In-Reply-To: <3E2D33FA.5090200@polyspace.com> References: <3E2D33FA DOT 5090200 AT polyspace DOT com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-E+b3pjNzMszZgl3x4UuJ" Organization: The-Means.net Message-Id: <1043152540.25142.1.camel@milo> Mime-Version: 1.0 Date: 21 Jan 2003 07:35:41 -0500 --=-E+b3pjNzMszZgl3x4UuJ Content-Type: multipart/alternative; boundary="=-BInHmyUbvShNRDMgzOUv" --=-BInHmyUbvShNRDMgzOUv Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Yep, I concur. If windows has a lock on the file, rm just hangs. I've seen it hang on directories when doing an 'rm -rf yada/*" On Tue, 2003-01-21 at 06:50, Gael Mulat wrote: > Hi, >=20 > This is a bug report about rm (package fileutils, version 4.1-1) on W= 2K. >=20 > Test case: take 2 cygwin shells. > shell 1: > mkdir /tmp/directory > vi /tmp/directory/file >=20 > shell 2: > /bin/rm -rf /tmp/directory >=20 > The shell2 doesn't manage to remove the directory and goes into an=20 > infinite loop, taking 100% of the CPU. > All is then OK if we go out of vi in the shell1. >=20 > Doing the same thing (deleting the directory) directly in Windows=20 > produces an error message: "cannot delete directory: Access is denied.=20 > The source file may be in use" and we can notice in the directory a file=20 > named .file.swp that is also visible under Cygwin with ls -la. >=20 > The example I have just given uses vi, but it is the same with all=20 > processes that open the file, as W2K puts a lock on it. >=20 > Gael Mulat >=20 >=20 >=20 >=20 > -- > 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/ --=20 David Means Different all twisty a of in maze are you, passages little. --=-BInHmyUbvShNRDMgzOUv Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yep, I concur.  If windows has a lock on the file, rm just hangs. = ; I've seen it hang on directories when doing an 'rm -rf yada/*"

On Tue, 2003-01-21 at 06:50, Gael Mulat wrote:
    Hi,

    This is a bug report about rm (package fileutils, version 4.1-1) on W2K=
.

    Test case: take 2 cygwin shells.
shell 1:
    mkdir /tmp/directory
    vi /tmp/directory/file

shell 2:
    /bin/rm -rf /tmp/directory

    The shell2 doesn't manage to remove the directory and goes into an=20
infinite loop, taking 100% of the CPU.
    All is then OK if we go out of vi in the shell1.

    Doing the same thing (deleting the directory) directly in Windows=20
produces an error message: "cannot delete directory: Access is denied.=
=20
The source file may be in use" and we can notice in the directory a fi=
le=20
named .file.swp that is also visible under Cygwin with ls -la.

    The example I have just given uses vi, but it is the same with all=20
processes that open the file, as W2K puts a lock on it.

Gael Mulat




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html<=
/FONT>
Documentation:         http://cygwin.com/docs.html<=
/FONT>
FAQ:                   http://cygwin.com/faq/=
--=20
David Means

Different all twisty a of in maze are you, passages little.
--=-BInHmyUbvShNRDMgzOUv-- --=-E+b3pjNzMszZgl3x4UuJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEABECAAYFAj4tPpwACgkQUd0KwqAz4aqmpACfaruQAtCrnQNNW06WssU8K+o+ 2lAAoJ2v/1li9A9CBdNdK8SGleyw8D/M =N5px -----END PGP SIGNATURE----- --=-E+b3pjNzMszZgl3x4UuJ--