[Hackage] #291: cabal-install cannot re-install itself on windows

Hackage trac at galois.com
Tue Jun 10 15:49:02 EDT 2008


#291: cabal-install cannot re-install itself on windows
---------------------------------+------------------------------------------
  Reporter:  duncan              |        Owner:         
      Type:  defect              |       Status:  new    
  Priority:  normal              |    Milestone:         
 Component:  cabal-install tool  |      Version:  1.2.3.0
  Severity:  normal              |   Resolution:         
  Keywords:                      |   Difficulty:  normal 
Ghcversion:  6.8.2               |     Platform:  Windows
---------------------------------+------------------------------------------
Comment (by duncan):

 http://msdn.microsoft.com/en-us/library/aa363858.aspx

 Perhaps if we use `CreateFile` to open our own `cabal.exe` file and
 specify `FILE_FLAG_DELETE_ON_CLOSE` then hopefully that would actually
 delete the `.exe` file when the process closes (which would be when the
 last handles are closed).

 This relies on the `.exe` file itself being opened by the kernel with
 `FILE_SHARE_DELETE` sharing. This would appear to be the case though since
 it is possible to rename a `.exe` file while the program is running.

 See also http://blogs.msdn.com/oldnewthing/archive/2004/06/07/150047.aspx

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/291#comment:2>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list