NAME
siglongjmp - Nonlocal goto with signal handling
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <setjmp.h>
void siglongjmp (
sigjmp_buf env,
int value );
PARAMETERS
env Specifies an address for a sigjmp_buf structure.
value
Specifies any nonzero value.
DESCRIPTION
The siglongjmp() function restores the environment saved by
the most recent sigsetjmp() function in the same process
with the corresponding sigjmp_buf parameter.
All accessible objects have values as of the time
siglongjmp() was called, except that the values of objects
of automatic storage duration that have been changed between
the sigsetjmp() call and siglongjmp() call are indeter-
minate.
As it bypasses the usual function call and return mechan-
isms, the siglongjmp() function executes correctly in con-
texts of interrupts, signals, and any of their associated
functions. However, if the siglongjmp() function is invoked
from a nested signal handler (that is, from a function
invoked as a result of a signal raised during the handling
of another signal), the behavior is undefined.
The siglongjmp() function restores the saved signal mask if
and only if the env parameter was initialized by a call to
the sigsetjmp() function with a nonzero savemask parameter.
CAUTION
If automatic and register variables are changed after the
sigsetjmp(), their values are indeterminate after the .nh
siglongjmp(). You cannot assume that these variables are
restored to what they were when the .nh sigsetjmp() was
called. Nor can you assume that they are set to whatever
value they had when the function sequence containing the .nh
siglongjmp() was started.
If you want them to retain the values they had when the
function sequence containing the .nh siglongjmp() is
started, declare them as volatile.
NOTES
AES Support Level: Full use
RETURN VALUES
After the siglongjmp() function is completed, program execu-
tion continues as if the corresponding call of the sig-
setjmp() function had just returned the value specified by
the value parameter. The siglongjmp() function cannot cause
the sigsetjmp() function to return 0 (zero); if value is 0,
the sigsetjmp() function returns 1.
RELATED INFORMATION
Functions: setjmp(3), sigprocmask(2), sigsetjmp(3),
sigsuspend(2)
Acknowledgement and Disclaimer