Signal Handling; Signals And Trap Numbers - HP Guardian Errors Manual

Procedure errors and messages manual
Table of Contents

Advertisement

Signal Handling

When a process receives a TNS/R native signal, the default action is for the process to abend.
Alternatively, the program can call the SIGACTION_INIT_ procedure to specify that another action
should result, such as the execution of a signal handler. If a signal handler has been specified, it
is executed when the process receives a signal. The actions of a signal handler typically include
either terminating the process or, in certain cases, resuming execution.
For additional information about signals and signal handling, refer to the Guardian Programmer's
Guide. For a description of the SIGACTION_INIT_ procedure, see the Guardian Procedure Calls
Reference Manual.

Signals and Trap Numbers

This subsection lists each signal by name with its equivalent trap number and provides a description
of each. In general, it includes only signals that are generated by the system; additional signals
can be generated by the raise() function. The list is in order by trap number. Signals that have no
equivalent trap are listed at the end of this subsection.
SIGSEGV, Trap 0
Cause An address was specified that was not within either the virtual code area or the virtual data
area allocated to the process.
NOTE:
If a TNS process has fewer than 32 pages of data stack, then a situation such as an
infinitely recursive TNS procedure causes a trap 0 instead of a trap 3.
References to privileged 32-bit addresses from unprivileged code are reported as SIGSEGV or
trap 0.
Effect For trap 0, process control passes to the Debug or Inspect debugger, or to the trap handler
designated by a call to the ARMTRAP procedure, or else the process is abended. See
Handling" (page 271)
For the signal SIGSEGV, the default or specified signal handling occurs. See
(page 272)
for further information.
Recovery If the illegal address reference occurred because of an erroneous pointer value, correct
the program. For TNS processes, if the address is lower than 65535. refer to the recovery
information for trap 3.
SIGILL, Trap 1
Cause The instruction failure is caused by one of the following:
There was an attempt to execute a code word that is not a valid instruction.
A nonprivileged process tried to either execute a privileged instruction or access a privileged
memory address.
An EXTENSIBLE procedure was called with a calling sequence that involved a mismatch. Most
commonly, the mismatch is the following: The calling program was compiled using an external
declaration that specified more parameters than were declared for the procedure being called,
and the calling program passed one of these unsupported parameters.
The program has executed a deliberate failure instruction emitted by the compiler to cause a
trap when an error situation was detected at run time. (For example, a pTAL program executed
an END statement without encountering a RETURN statement.)
272 Traps and Signals
Illegal address reference
for further information.
Instruction failure
"Trap
"Signal Handling"

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Guardian

Table of Contents