SIGALRM, SIGVTALRM, and third party libraries

Bryan O'Sullivan bos at serpentine.com
Sat Sep 4 01:28:38 EDT 2010


On Fri, Sep 3, 2010 at 2:13 PM, Edward Z. Yang <ezyang at mit.edu> wrote:

>
> I think the primary downside is that it's not portable (yet) to Windows.


That's fine, assuming that blocking those signals doesn't cause some more
catastrophic failure. My current narrow need is for code that works on the
platforms I actually use :-)

Simon
> Marlow and I have been working on "interruptible FFI calls", and one of the
> things that needs to be addressed along the way is that the RTS should
> publish
> "portable" equivalents of the pthread functions which are blessed for
> foreign
> libraries to use for this purpose.  Maybe we should emulate threading
> functionality
> at the pthreads layer?
>

I don't know. I imagine you've Googled and found this?
http://locklessinc.com/articles/pthreads_on_windows/


> P.S. I assume that the mysql C bindings are poorly written so as not to
> work
> with alarm signals?
>

It's a very rare library that handles an errno of EINTR after a system call
properly. The mysql client is no exception.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20100904/8f02dc20/attachment.html


More information about the Glasgow-haskell-users mailing list