On Mon, Aug 1, 2011 at 11:45 PM, Matthew Mondor <mm_li...@pulsar-zone.net>wrote:

> BTW, is there a facility already present in ECL so that I can in the
> top-level decide which unix signal to ignore (a-la sigaction(2)
> SIG_IGN), and block/unblock it on a per-thread basis (i.e. a-la
> pthread_sigmask(3))?  Or must my code use inline C as necessary to do
> this?  I guess that such code would have no relevance on non-POSIX OSs
> though...


ECL has a function, EXT:CATCH-SIGNAL, which takes two arguments: a signal
constant and a flag (T/NIL), activating or deactivating that signal
globally. Today I did two things: one is to add a :LOCAL keyword argument to
have the action take place only on the current thread, and export the signal
constants from the EXT package.

Sample use

(ext:catch-signal ext:+sigpipe+ nil) ;; Global
(ext:catch-signal ext:+sigpipe+ nil :local t) ;; Thread local

Could you please test it and report whether it works sufficiently well for
your purposes?

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to