Chapter Contents |
Previous |
Next |
siglongjmp |
Portability: | POSIX.1 conforming |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
CAUTION | |
EXAMPLE | |
RELATED FUNCTIONS | |
SEE ALSO |
SYNOPSIS |
#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)
DESCRIPTION |
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
.
See blkjmp for more information on
saving the signal mask as a part of a setjmp
operation and restoring it as part of a longjmp operation.
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.
RETURN VALUE |
siglongjmp
does not return a value.
CAUTION |
The function in which the corresponding
call to
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.
EXAMPLE |
See the example for
sigsetjmp
.
RELATED FUNCTIONS |
SEE ALSO |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.