Is it an error to call hGetLine on a non-blocking Handle?
Alain O'Dea
alain.odea at gmail.com
Tue May 6 05:04:35 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi folks:
I could really use an expert eye on this.
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?
Is it an error to call hGetLine on a non-blocking Handle?
Thanks,
Alain
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTaG1jAAoJEP0rIXJNjNSAxpwH/immeV301FEZx9o6Q0ODCuqK
AUBnDHcjS9VBqhJ7XnuwkWXi83qNJhoi9P4RjamL3EGnScHVfa1mnpkX5T1IWCb4
S4lWxICbVH4tmFYOwHmElzi8vzBvgmsCueiU5uMJc66dteR4U2e9FHb9Vaurg222
dDwfIYu7mIEb/Fld4dqN+qFp9ZbVPxjBASVPlIDpZFY95+0hMq/s331B5T6zi/ZZ
o63pYR2xkIScIlocEYaYJT67OssYxHScu6F/dOu4F4dllV013cP0x6/6ov4KCpBi
fqM5WRid1UyTtCco2dXg7eRkzQxEMoVL0TpEQbDn/iWKJS99+rG3YSt5JYDbhTY=
=xtDH
-----END PGP SIGNATURE-----
More information about the Libraries
mailing list