The corresponding Fn longjmp functions restore the environment saved by their most recent respective invocations of the Fn setjmp function. They then return so that program execution continues as if the corresponding invocation of the Fn setjmp call had just returned the value specified by Fa val , instead of 0.
Pairs of calls may be intermixed, i.e. both Fn sigsetjmp and Fn siglongjmp and Fn setjmp and Fn longjmp combinations may be used in the same program, however, individual calls may not, i.e. the Fa env argument to Fn sigsetjmp may not be passed to Fn longjmp .
The Fn longjmp routines may not be called after the routine which called the Fn setjmp routines returns.
All accessible objects have values as of the time Fn longjmp routine was called, except that the values of objects of automatic storage invocation duration that do not have the volatile type and have been changed between the Fn setjmp invocation and Fn longjmp call are indeterminate.
The Fn setjmp Ns / Ns Fn longjmp pairs save and restore the signal mask while Fn _setjmp Ns / Ns Fn _longjmp pairs save and restore only the register set and the stack. (See Fn sigmask 2 . )
The Fn sigsetjmp Ns / Ns Fn siglongjmp function pairs save and restore the signal mask if the argument Fa savemask is non-zero, otherwise only the register set and the stack are saved.