Signal APIs can be used to manipulate signals in a threaded process. Signals can be sent to individual threads, the signal mask of a thread can be changed. When a signal is sent to a thread, the actions associated with the signal (such as stopping, continuing or terminating) never affect only the thread, all signal actions are defined to affect the process. When a signal handler is called, it is called in the thread that the signal was delivered to.
Using signals correctly in a multithreaded process can be difficult. The recommended way to handle signals in a multithreaded process is to mask off all signals in all threads, then use the signals sigwait() API in a single thread to wait for any signal to be delivered to the process.
For information about the examples included with the APIs, see the information on the API examples.
The Signals APIs are:
Pthread APIs | APIs by category |