[GHC] #12912: IO library should not use select()

GHC ghc-devs at haskell.org
Wed Apr 12 17:42:29 UTC 2017


#12912: IO library should not use select()
-------------------------------------+-------------------------------------
        Reporter:  simonmar          |                Owner:  simonmar
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.2
       Component:  libraries/base    |              Version:  8.0.1
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 No, this is certainly not expected.
 37d7c1596ee936ec6597a5c1898e1fdca7c04f77 adds a testcase to ensure that we
 catch this next time.

 The problem appears to be that the patch assumes that all IO operations go
 through the IO manager, which will take care of waiting for us. However,
 `GHC.IO.Handle.Text.hWaitForInput` appears to call `GHC.IO.Fd.ready`
 directly, which then passes the timeout to `fdReady`. It's not entirely
 clear what was intended by this comment,
 {{{#!hs
     // We only handle msecs == 0 on non-Windows, because this is the
     // only case we need.  Non-zero waiting is handled by the IO manager.
 }}}

 Jaffacake, can you clarify how you intended for this work? Where is this
 IO manager treatment?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12912#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list