openFd under -threaded gets interrupted

Simon Marlow marlowsd at gmail.com
Mon Dec 21 07:23:07 EST 2009


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 =
> False, noctty = True, exclusive = False, nonBlock = True, trunc =
> False }
>
> If I compile my program with -threaded option I always get such error:
>
> interrupted (Interrupted system call)
>
> But without -threaded it works flawlessly. I am using Linux 2.6.30
> amd64, GHC 6.10.4. It was the same with 6.8. And I have tested it also
> on 6.12.1.

It's a bug - openFd should be checking for EINTR.  I'll fix it.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list