On Mon, Nov 29, 2010 at 9:49 PM, wren ng thornton <w...@freegeek.org> wrote:

> Isn't that pretty normal?
>>
>
> The blocking for someone to open the other end is perfectly normal. The
> fact that compiling with -threaded takes a perfectly working program and
> makes it consistently crash I wouldn't call "normal".
>

Actually, this happens all the time if you're calling a system call that
isn't already wrapped for you, and the behaviour is expected: you absolutely
must expect, and deal with, EINTR. Here's an example:
http://www.serpentine.com/blog/2010/09/04/dealing-with-fragile-c-libraries-e-g-mysql-from-haskell/

Are you using System.Posix.IO.openFD? The check for EINTR wasn't added to
the unix package until January of this year, so perhaps the version of GHC
or the unix package that you're using is too old to contain the fix?


> N.B., the call to openFd in question is from the main thread and before any
> STM or forkIO shenanigans.


That doesn't matter. Once the threaded RTS starts, it's going to send your
program SIGVTALRM.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to