5.5 Signals in Threaded Applications

The Pthreads implementation is process-centric on Oracle Linux. As far as signals are concerned, each thread is viewed as an independent process. The kernel does not differentiate between threads and processes. Within a single process, the threads share many resources such as virtual memory, file descriptors, and global variables. As a result, multithreaded applications might not handle signals in a POSIX-compliant way. Signals are directly sent to individual threads and not to the process as a whole. The POSIX standard specifies that a signal that is received by a process can be handled by any single thread within the targeted process. Programs that depend on this aspect of signal delivery might find issues with this difference in implementation.