delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/13/16:36:55

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4B255D7D.2030805@t-online.de>
References: <416096c60912130019s5188fdd9w2f561005ba2c8c69 AT mail DOT gmail DOT com> <4B24DB01 DOT 2040201 AT t-online DOT de> <4B24FF57 DOT 9050309 AT byu DOT net> <416096c60912131301j1d35faf4x2e0dd64b1fa2849 AT mail DOT gmail DOT com> <4B255D7D DOT 2030805 AT t-online DOT de>
Date: Sun, 13 Dec 2009 21:36:45 +0000
Message-ID: <416096c60912131336i7ebf44a6g20661ad2044f3322@mail.gmail.com>
Subject: Re: overwriting an in-use executable
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

2009/12/13 Christian Franke:
> 'cp' does not unlink() before overwriting an existing file, it tries to
> overwrite the data in place. This also fails on *nix, typically with "Text
> file busy".
> 'mv' only modifies the link between file name in directory and file data.
> The OS can keep the old data (inode) until the exe terminates.

That makes plenty of sense.

Thanks,
Andy

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

- Raw text -


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