#4514: IO manager can deadlock if a file descriptor is closed behind its back
---------------------------------+------------------------------------------
    Reporter:  adept             |       Owner:  bos                        
        Type:  bug               |      Status:  patch                      
    Priority:  normal            |   Component:  Runtime System             
     Version:  7.0.1             |    Keywords:                             
    Testcase:                    |   Blockedby:                             
          Os:  Linux             |    Blocking:                             
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------

Comment(by bos):

 I think we might need to change the type of {{{threadWait}}} (and hence
 {{{threadWaitRead}}} and {{{threadWaitWrite}}}), so that it either takes a
 parameter indicating what exception to throw, or returns a value that the
 caller can inspect to see what kind of exception ''it'' should throw. The
 former seems safer to me.

 We could use this for two cases:

 * we close a file descriptor behind a waiter's back

 * a back end's {{{poll}}} method returns the equivalent of {{{POLLHUP}}}
 (and maybe {{{POLLERR}}})

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4514#comment:22>
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