#891: hsc2hs tries to remove an open file
-----------------------+----------------------------------------------------
  Reporter:  eivuokko  |          Owner:         
      Type:  bug       |         Status:  new    
  Priority:  normal    |      Milestone:         
 Component:  Compiler  |        Version:  6.4.2  
  Severity:  normal    |     Resolution:         
  Keywords:            |             Os:  Windows
Difficulty:  Unknown   |   Architecture:  Unknown
-----------------------+----------------------------------------------------
Comment (by simonpj):

 Brian Smith adds:
 hsc2hs generates an EXE file, then executes it, then waits for that
 process to finish, and then attempts to delete the file. The file is never
 opened by hsc2hs directly so the GC does not seem to be the cause.

 It seems that even though waitForProcess returns successfully, Windows
 still an open file handle for the EXE file when removeFile is called. That
 is really surprising because I expect that the file should be free to
 delete after waitForProcess has returned.

 I tried to rewrite the code so that it enters a remove-catch "permission
 denied"-sleep loop but I could not find a portable "sleep" IO action. For
 now, I just commented out the entire removeFile action.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/891>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to