Re: openFd under -threaded gets interrupted

2009-12-21 Thread Simon Marlow
On 18/12/2009 17:40, Mitar wrote: Hi! I have written about this to Haskell cafe and they advised me to write it here. I have a problem that I cannot open /dev/rfcomm0 device if I compile my program with -threaded option. Like: fd- openFd /dev/rfcomm0 ReadWrite Nothing OpenFileFlags { append =

openFd under -threaded gets interrupted

2009-12-18 Thread Mitar
Hi! I have written about this to Haskell cafe and they advised me to write it here. I have a problem that I cannot open /dev/rfcomm0 device if I compile my program with -threaded option. Like: fd - openFd /dev/rfcomm0 ReadWrite Nothing OpenFileFlags { append = False, noctty = True, exclusive =

Re: openFd under -threaded gets interrupted

2009-12-18 Thread Donn Cave
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 ...

Re: openFd under -threaded gets interrupted

2009-12-18 Thread Mitar
Hi! On Fri, Dec 18, 2009 at 7:15 PM, Donn Cave d...@avvanta.com wrote:        setSignalMask fullSignalSet        fd - openFd ...        setSignalMask emptySignalSet Thanks! This did it. At the end it is enough to block just virtualTimerExpired signal and it works. Probably it is something RTS