[GHC] #13519: hWaitForInput does not work on linux.
GHC
ghc-devs at haskell.org
Mon Apr 3 12:35:56 UTC 2017
#13519: hWaitForInput does not work on linux.
-------------------------------------+-------------------------------------
Reporter: | Owner: (none)
junji.hashimoto |
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
hWaitForInput does not work on linux.
When hWaitForInput has non-zero waiting time, it always fails.
The code is following ghci-code.
This is because inputReady.c
(https://github.com/ghc/ghc/blob/ghc-8.0/libraries/base/cbits/inputReady.c#L27)
does not allow 'msecs != 0'.
{{{
$ ghci
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
Prelude> :m + System.IO
Prelude System.IO> f <-openFile "stack.yaml" ReadMode
Prelude System.IO> hWaitForInput f 10
fdReady: msecs != 0, this shouldn't happenAborted (core dumped)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13519>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list