How to get errno from an IOError in haskell?

I am on a haskell platform, GHC 6.12.1, as apt-get installed on Debian Squeeze. How can I get a basic error from an IOError, given that I need it in another thread, from where it was originally created?

I need this because I am implementing a network protocol that provides the actual errno value to the wire. Do I need to restore it?

+3
io haskell ghc errno
source share
1 answer

errno thread-local in GHC. You need to catch errno in one thread; then send the value down a Chan or other communication abstraction to the listening stream.

The value is stored in the TSO stream structure .

+4
source share

All Articles