make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switching from CVS to GIT


From: Alex Riesen
Subject: Re: Switching from CVS to GIT
Date: Mon, 15 Oct 2007 19:56:06 +0200
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

Johannes Schindelin, Mon, Oct 15, 2007 03:22:53 +0200:
> On Sun, 14 Oct 2007, Brian Dessent wrote:
> > Johannes Schindelin wrote:
> > > The problem is that on Windows, you cannot keep a file open and delete 
> > > it at the same time.  This is an issue in Windows' equivalent of VFS.
> > > 
> > > A neat trick to work with temporary files without permission issues is 
> > > to open the file and delete it right after that.  This does not work 
> > > on Windows.
> > 
> > You can achieve the same thing on Windows with CreateFile() by setting 
> > the dwShareMode parameter to zero and setting the 
> > FILE_FLAG_DELETE_ON_CLOSE attribute on dwFlagsAndAttributes.  This 
> > results in a file that cannot be opened or read by any other process and 
> > that will be automatically deleted when all open handles are closed.
> 
> Aha.  So to support Windows, we have to wrap all sites that use that 
> trick, and special case that #ifdef __MINGW32__. 

He misunderstood. It is not what you meant. You cannot remove the open
file. What he talks about is removing the file after it is _closed_.
Junk.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]