Guardian Programmer's Guide

Table Of Contents
Debugging, Trap Handling, and Signal Handling
Guardian Programmer’s Guide 421922-014
25 - 22
Comparing Traps and Signals
pending. The order in which pending signals are delivered to a process once they are
unblocked is unspecified.
Default Signal Settings in Guardian Processes
When a Guardian native process is created, the process signal mask is initialized so
that no signal is blocked. If a signal is delivered to the process for which the default
action is to terminate the process, process termination remains the default action. For
any other signal, the default action is set to ignore the signal.
Comparing Traps and Signals
In the native Guardian environment, a signal is said to be nondeferrable if it cannot be
blocked and cannot be ignored. Whether action upon a signal can be deferred
depends not on the type of signal it is but on whether the signal is generated by the
system, by the process itself (to itself) using the raise() function, or by a timer to the
process.
A signal generated by the system to indicate a run-time error in the process cannot be
deferred. A signal generated by a process to itself or by a timer can be deferred.
A trap received by a TNS process is equivalent to a system-generated nondeferrable
signal received by a native process. Traps are a subset of POSIX.1 signals.
Table 25-2 shows the signals that map to traps.
Table 25-2. Map of Signals to Traps
Signal Description Trap Number
SIGABRT Abnormal termination None: new
SIGFPE Arithmetic overflow 2
SIGILL Invalid hardware instruction 1
SIGLIMIT Limits exceeded 5
SIGMEMERR Uncorrectable memory error 13
SIGMEMMGR Memory manager disk read error 11
SIGNOMEM No memory available 12
SIGSEGV Invalid memory reference 0
SIGSTK Stack overflow 3
SIGTIMEOUT Process loop timeout 4
Note. Under very unusual circumstances, a signal can be delivered to a TNS Guardian
pro
cess. Any signal is delivered as trap number 8 to a TNS Guardian process.