<div class="gmail_quote">On Mon, Nov 29, 2010 at 9:49 PM, wren ng thornton <span dir="ltr">&lt;<a href="mailto:wren@freegeek.org">wren@freegeek.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Isn&#39;t that pretty normal?<br>
</blockquote>
<br></div>
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&#39;t call &quot;normal&quot;.<br></blockquote>
<div><br></div><div>Actually, this happens all the time if you&#39;re calling a system call that isn&#39;t already wrapped for you, and the behaviour is expected: you absolutely must expect, and deal with, EINTR. Here&#39;s an example: <a href="http://www.serpentine.com/blog/2010/09/04/dealing-with-fragile-c-libraries-e-g-mysql-from-haskell/">http://www.serpentine.com/blog/2010/09/04/dealing-with-fragile-c-libraries-e-g-mysql-from-haskell/</a></div>
<div><br></div><div>Are you using System.Posix.IO.openFD? The check for EINTR wasn&#39;t added to the unix package until January of this year, so perhaps the version of GHC or the unix package that you&#39;re using is too old to contain the fix?</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
N.B., the call to openFd in question is from the main thread and before any STM or forkIO shenanigans.</blockquote><div><br></div><div>That doesn&#39;t matter. Once the threaded RTS starts, it&#39;s going to send your program SIGVTALRM.</div>
</div>