delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/03/20/14:22:03

Message-Id: <200003201922.OAA30699@delorie.com>
Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
From: "Parker, Ron" <rdparker AT butlermfg DOT com>
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: RE: New Win98 problem, similar to _unlink problem
Date: Mon, 20 Mar 2000 13:19:36 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)

> -----Original Message-----
> From: Chris Faylor [mailto:cgf AT cygnus DOT com]

<snip>

> You're renaming an opened file.  AFAIK, that particular problem is
> insurmountable in Windows.

I do know that under some circumstances in NT it is possible to rename an
executable while it is running and therefore open and memory mapped. I have
not yet figured out what flags are used to open a file and still allow it to
be renamed.  

Since the opening of an executable occurs deep within the OS this may be a
red herring and the file open modes that are used to allow this may not be
available to an enduser application.

A simple example of this is to create a simple C program, compile and step
into it in the debugger, then rename the EXE in Windows Explorer.  This is
allowed, but if you attempt to delete the file in Explore, access is denied.

The HandleEx and NTFilMon programs from Sysinternals showed that the
executable was in fact open while being debugged and renamed.

- Raw text -


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