Guardian Procedure Calls Reference Manual

Considerations
SIGLONGJMP_ is the TAL or pTAL procedure name for the C siglongjmp() function. The
C siglongjmp() function complies with the POSIX.1 standard.
SIGLONGJMP_ does not return. Normally, return is made through the corresponding
SIGSETJMP_ procedure.
Restoring the signal mask with this procedure enables a native process to receive multiple
occurrences of the same nondeferrable signal when this procedure is used to exit a signal
handler. If the signal mask is not restored and the same nondeferrable signal occurs a second
time, then the process terminates.
For details on deferrable and nondeferrable signals, see SIGACTION_INIT_ Procedure
(page 1362).
The buffer pointed to by env is assumed to be valid and initialized by an earlier call to
SIGSETJMP_. If an invalid address is passed or if the caller modifies the jump buffer, the result
is undefined and could cause the system to deliver a nondeferrable signal to the process.
If SIGLONGJMP_ detects an error, a SIGABRT or SIGILL signal is raised.
If SIGLONGJMP_ is passed a jump buffer initialized by SETJMP_, then a simple long jump
(without restoring the signal mask) is executed.
The jump buffer must be accessible to both the long jump procedure call and the associated
set jump procedure call.
The procedure that invoked the corresponding call to SIGSETJMP_ must still be active; that is,
the activation record of the procedure that called SIGSETJMP_ must still be on the stack.
A long jump across a transition boundary between the TNS and native mode environments,
in either direction, is not permitted. Any attempt to do so will be fatal to the process.
A nonprivileged caller cannot jump to a privileged area. Any attempt to do so will be fatal
to the process. A privileged caller, however, can execute a long jump across the privilege
boundary; privileges are automatically turned off before control returns to the SIGSETJMP_
procedure.
As a result of optimization, the values of nonvolatile local variables in the procedure that calls
SIGSETJMP_ might not be the same as they were when SIGLONGJMP_ was called if the
variables are modified between the calls to SIGSETJMP_ and SIGLONGJMP_. C and pTAL
programs can declare variables with the volatile type qualifier; this is the only safe way of
preserving local variables between calls to SIGSETJMP_ and SIGLONGJMP_. Alternatively,
you can make the variables global.
Example
SIGLONGJMP_ ( env, value );
Related Programming Manual
For programming information about the SIGLONGJMP_ procedure, see the Guardian Programmer's
Guide.
SIGLONGJMP_ Procedure 1375