[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


A.5 Using Signals

This section discusses POSIX 1003.1c-1995 signal handling.

Digital UNIX Version 4.0 introduces the full POSIX 1003.1c-1995 signal model. In previous versions, "synchronous" signals (those resulting from execution errors, such as SIGSEGV and SIGILL) could have different signal actions for each thread. Prior to Digital UNIX Version 3.2, all threads shared a common process-wide signal mask, which meant one thread could not receive a signal while another had the signal blocked.

For Digital UNIX Version 4.0, all signal actions are process-wide. That is, when any thread uses sigaction or equivalent to set a signal handler, or to modify the signal action (e.g., to ignore a signal), that action will affect all threads. Each thread has a private signal mask, so that it can block signals without affecting the behavior of other threads.

Prior to Digital UNIX Version 4.0, asynchronous signals were processed only in the main thread. In Digital UNIX Version 4.0, any thread that doesn't have the signal masked may process the signal. For binary compatibility, threads created using the cma or 1003.4a Draft 4 interfaces begin with all asynchronous signals blocked.