
18 Dec
2009
18 Dec
'09
1:15 p.m.
Quoth Mitar
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