Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com From: Chris Faylor Date: Mon, 20 Mar 2000 14:27:39 -0500 To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: New Win98 problem, similar to _unlink problem Message-ID: <20000320142739.A23689@cygnus.com> Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com Mail-Followup-To: cgf AT cygnus DOT com, cygwin-developers AT sourceware DOT cygnus DOT com References: <200003201922 DOT LAA00566 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.8i In-Reply-To: <200003201922.LAA00566@cygnus.com>; from rdparker@butlermfg.com on Mon, Mar 20, 2000 at 01:19:36PM -0600 On Mon, Mar 20, 2000 at 01:19:36PM -0600, Parker, Ron wrote: >> -----Original Message----- >> From: Chris Faylor [mailto:cgf AT cygnus DOT com] > > > >> 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. Ok. I would appreciate it if someone would investigate this and discover exactly what needs to be done. cgf