Quoth Mitar <mmi...@gmail.com>,

> Also is there any workaround possible in Haskell/GHC? For example
> making time while openFd is in progress without interrupts?

You might try something like this:

    import System.Posix.Signals

    ...
        setSignalMask fullSignalSet
        fd <- openFd ...
        setSignalMask emptySignalSet

I'm not in a position to try it in exactly the same situation, but
I see that when I run with all signals blocked as above, after a while
I have a SIGALRM pending (with -threaded or not), so I reckon that might
be the signal used by the runtime thread manager.  If it works, I would
recommend blocking only that signal during the openFd, so for example
you'll be able to abort normally with SIGINT if the device is stuck.

        Donn

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to