hWaitForInput does not work on linux.
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)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown/Multiple |
| Architecture |