[GHC] #3128: hClose leaves file descriptor open if it fails
GHC
trac at galois.com
Thu May 14 14:15:58 EDT 2009
#3128: hClose leaves file descriptor open if it fails
---------------------------------+------------------------------------------
Reporter: Baughn | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone: 6.12.1
Component: libraries/base | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by Baughn):
I would like to add that Handles *should* contain an MVar (Maybe FD) or
some such instead of just an FD. Or, rather, after a handle is hClosed -
and the socket goes away - it ought to be impossible to use that handle
for anything whatsoever.
As it is now, it's possible for the FD to be reused, and for code that
reuses the closed Handle to touch someone else's FD.
This may not violate the haskell spec, but neither would code where you
can't do that, and the cost would be trivial.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3128#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list