I'm trying to get to the bottom of a very tenacious bug in the GHC
Builder.
The details of how this happens are documented separately for reference:
https://gist.github.com/AlainODea/dc841046524cd7833da8
The Handles involved are returned by
System.Process.runInteractiveProcess. They are non-blocking at the
Illumos kernel level.
It appears that maybeFillReadBuffer (called by hGetLine under the
hood) treats EAGAIN as an error:
http://hackage.haskell.org/package/base-4.7.0.0/docs/src/GHC-IO-Handle-Text.html#maybeFillReadBuffer
Is it expected that runInteractiveProcess would return non-blocking
Handles for stdout and stderr?