#include <lcjmp.h> void siglongjmp(sigjmp_buf stack, int value)The synopsis for the POSIX implementation is
#include <setjmp.h> void siglongjmp(sigjmp_buf stack, int value)
siglongjmp
restores a previously saved stack environment and
signal mask. stack
is the address for the sigjmp_buf
structure that contains the stack environment. The stack environment
and signal mask must have been saved by sigsetjmp
. The mask
is restored only if it was saved by sigsetjmp
. Control is
returned to the point in the program corresponding to the call to
sigsetjmp
. Execution continues from this point, just as
if the sigsetjmp
function had returned the value specified
by the value
argument.
The siglongjmp
function restores the old signal mask before
jumping to the location defined in the sigjmp_buf
structure.
Because of this, if the jump is intercepted by blkjmp
, the
function that issued the block receives control with the new signal
mask, and it is not required to know whether it received control as the
result of a regular longjmp
or a siglongjmp
.
Note:
The sigjmp_buf
data type contains more information than a
standard jmp_buf
. For this reason, you cannot call
siglongjmp
with a buffer filled by the setjmp
function.
siglongjmp
does not return a value.
sigsetjmp
is
made must not have returned before you make the call to
siglongjmp
. If siglongjmp
is passed a value
of 0, a 1
is substituted.
sigsetjmp
.
longjmp
, sigsetjmp
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.