OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
8.2.2.2 The POSIX sigaction( ) Service
The DCE Threads implementation of the POSIX sigaction( ) service allows for per-
thread handlers to be installed for catching synchronous signals. The sigaction( ) routine
modifies behavior only for individual threads and works only for synchronous signals.
Setting the signal action to SIG_DFL for a specific signal will restore the thread’s
default behavior for that signal. Attempting to set a signal action for an asynchronous
signal is an error.
8.2.2.3 The itimer VTALARM
DCE Threads installs a handler for the itimer VTALARM. Therefore, VTALARM is
unavailable for use by other applications.
8.2.3 Alternatives to Using Signals
Avoid using UNIX signals in multithreaded programs. DCE Threads provides
alternatives to signal handling. These alternatives are discussed in more detail in
Sections 8.6 and 8.7.
Note: In order to implement these alternatives, DCE Threads must install its own
signal handlers. These are installed when DCE Threads initializes itself,
typically on the first thread-function call. At this time, any existing signal
handlers are replaced.
Following are several reasons for avoiding signals:
• They cannot be used in a modular way in a multithreaded program.
• They are unnecessary when used as an asynchronous programming technique in a
multithreaded program.
• There are almost no threads services available at signal level.
• There is no reliable, portable way to modify predicates.
• The signal-handler interface is unsuitable for use with threads. (For example, there
is one signal action per signal per process, there is one signal mask per process, and
sigpause() blocks the whole process.)
8− 8 Tandem Computers Incorporated 124245