delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/02/07:27:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <003001c1da42$1baf1400$0100a8c0@advent02>
From: "Chris January" <chris AT atomice DOT net>
To: <cygwin AT cygwin DOT com>
References: <OE47PHuJIQSP9lk34ry0000301e AT hotmail DOT com> <200204021158 DOT g32Bwc229959 AT star DOT vcsd DOT net>
Subject: Re: 1.1.10 Problem: mv and directories in use
Date: Tue, 2 Apr 2002 13:29:59 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

> I believe the main source of the problem is a Windows "BUG" (Not really a
> bug, that is how Windows is "intended" to work). Anyways, it is an
> undesirable "feature" for sure, and very annoying when in the Cygwin
> enviornment. For the average joe Windows user in Windows Explorer it "kind
> of" makes sense that Windows works this way.
It is also due, in part, to the way Cygwin's fhandler's work.

> If bash (or cmd) is in a particular directory just sitting at the prompt,
> that directory is in use, then that problem will arise if the directory is
> attempted to be moved. It is very annoying. As a partial work around, bash
> could be maybe modified to never "sit" in the current directory, but
instead
> to hang out on the root of the drive, and only switch to the current
> directory when a command is run.
I agree, try submitting a patch for bash and see if it gets accepted.

>
> A similar problem (due to the same, or related, Windows "BUG") manifests
> itself if you try to overwrite an executable that has an instance of
itself
> currently running. That is a very annoying "feature" as well.
This is because the executable files are memory mapped so that currently
running applications don't take up so much memory.

>
> Though I agree with you, it would be nice if mv said ahead of time that it
> could not do it and saved me the clean up hassles when it fails.
I disagree. Ok, some files maybe can't be deleted at the present time, but
say I want a directory in its new location now. If mv refused to act when
one or more files were locked I'd have to copy the whole directory and then
come back and delete the old directory later. What if I forget? I lose a
whole load of disk space, whereas if only one or two files are left behind
that's far more acceptable. It's better for mv to execute the user's command
as far as possible.

> > Instead of returning an error, something like "/1" is in use, it copies
/1
> > to /2, THEN returns:
> > mv: cannot remove directory `/1': Permission denied
> > mv: cannot remove `/1': Permission denied
> >
> > Shouldn't it say something like:
> > mv: cannot move `/1': Directory in use
No.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019