Re: Hugs does not free file handles on stop pressed
Ross Paterson <[email protected]> Fri, 16 Feb 2007 13:58:07 +0000
| Newsgroups | gmane.comp.lang.haskell.hugs.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Feb 15, 2007 at 11:12:04PM +0000, Neil Mitchell wrote: > If you abort a Hugs computation which has an open file handle, it > remains open. I.e. do a writeFile "filename.txt" (show (1, last > [1..])), press Stop or Ctrl+C and the file handle remains open. > > However, doing "print 1", or just about anything as the next > operation, results in the file handle being closed after that command > aborts. I suspect that this means there is some routine out there that > closes the file handles and does the tidy up - if it could be invoked > on abort that would be handy. It's done by the garbage collector. It was invoked, but there were still references to the handle at that time. Now fixed in CVS.