[Prev] [Contents] [Next]
Signals APIs
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 (like stopping, continuing or terminating) never effect only the thread, all signal actions are defined to effect the process. When a signal handler is invoked, it is invoked in the thread that the signal was delivered to.
Using signals correctly in a multi-threaded process can be difficult. The recommended way to handle signals in a multi-threaded 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.
[Prev] [Contents] [Next]
Copyright © 1998, IBM Corporation. All rights
reserved.
Comments? Contact rchthrds@us.ibm.com