<div class="gmail_quote">On Mon, Aug 1, 2011 at 11:45 PM, Matthew Mondor <span dir="ltr"><<a href="mailto:mm_lists@pulsar-zone.net">mm_lists@pulsar-zone.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

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

<div><br></div><div>Sample use</div><div><br></div><div>(ext:catch-signal ext:+sigpipe+ nil) ;; Global</div><div>(ext:catch-signal ext:+sigpipe+ nil :local t) ;; Thread local</div></div><div><br></div><div>Could you please test it and report whether it works sufficiently well for your purposes?</div>

<div><br></div><div>Juanjo</div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>