Not using any of the standardized threading interfaces. There are two
categories of signal defined:
- so-called asychronous signals targetted at the process (eg
SIGCHLD or SIGALRM): These are supposed to be handled by an
arbitrary thread not blocking them (presumably, one that
isn't already busy doing something else)
- synchronous signals (eg SIGSEGV), which are supposed to be
sent to the thread which caused them
It is possible to send signals to specific threads using pthread_kill,
but not to defined per-thread handlers for any signals (eg that one
thread does something different upon reception of a SIGUSR1 than
another).