title: POSIX threads and signals
body: <p>I've been trying to understand the intricacies of how POSIX threads and POSIX signals interact. In particular, I'm interested in:</p>
  
  <ul>
  <li>What's the best way to control which thread a signal is delivered to (assuming it isn't fatal in the first place)?</li>
  <li>What is the best way to tell another thread (that might actually be busy) that the signal has arrived? (I already know that it's a bad idea to be using pthread condition variables from a signal handler.)</li>
  <li>How can I safely handle passing the information that a signal has occurred to other threads? Does this need to happen in the signal handler? (I do not in general want to kill the other threads; I need a far subtler approach.)</li>
  </ul>
  
  <p>For reference about why I want this, I'm researching how to convert the <a href="http://sourceforge.net/projects/tclx/" rel="noreferrer">TclX</a> package to support threads, or to split it up and at least make some useful parts support threads. Signals are one of those parts that is of particular interest.</p>