Guardian Procedure Calls Reference Manual

LONGJMP_ does not return. Normally, return is made at the location of the corresponding
SETJMP_ procedure.
The jump buffer is assumed to be valid and initialized by an earlier call to SETJMP_. 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 non-deferrable signal to the process.
If LONGJMP_ detects an error, a SIGABRT or SIGILL signal is raised (except for TNS
processes).
The jump buffer must be accessible to both the LONGJMP_ procedure call and the associated
SETJMP_ procedure call.
The procedure that invoked the corresponding call to SETJMP_ must still be active. That is, the
activation record of the procedure that called SETJMP_ must still be on the stack.
A long jump across a transition boundary between the TNS and native 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 SETJMP_
procedure.
As a result of optimization, the values of nonvolatile local variables in the procedure that calls
SETJMP_ might not be the same as they were when LONGJMP_ was called if the variables
are modified between the calls to SETJMP_ and LONGJMP_. 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 SETJMP_ and LONGJMP_. Alternatively, you can make the variables
global.
Example
LONGJMP_ ( env, value );
Related Programming Manual
For programming information about the LONGJMP_ procedure, see the Guardian Programmer's
Guide.
780 Guardian Procedure Calls (L)