NAME
sigsetjmp — set
jump point for a non-local goto
SYNOPSIS
#include <setjmp.h> int sigsetjmp(sigjmp_buf env, int savemask);
DESCRIPTION
A call to sigsetjmp() saves the calling environment in its env
argument for later use by siglongjmp(3) . It is
unspecified whether sigsetjmp() is a macro or a function. If a macro
definition is suppressed in order to access an actual function, or a program
defines an external identifier with the name
sigsetjmp the behaviour is undefined.
If the value of the savemask argument is not 0, sigsetjmp() will also save the current signal mask of the calling thread as part of the calling environment.
All accessible objects have values as of the time siglongjmp() was called, except that the values of objects of automatic storage duration which are local to the function containing the invocation of the corresponding sigsetjmp() which do not have volatile-qualified type and which are changed between the sigsetjmp() invocation and siglongjmp() call are indeterminate.
An invocation of sigsetjmp() must appear in one of the following contexts only:
- the entire controlling expression of a selection or iteration statement
- one operand of a relational or equality operator with the other operand an integral constant expression, with the resulting expression being the entire controlling expression of a selection or iteration statement
- the operand of a unary (!) operator with the resulting expression being the entire controlling expression of a selection or iteration
- the entire expression of an expression statement (possibly cast to void ).
RETURN VALUE
If the return is from a successful direct invocation, sigsetjmp() returns 0. If the return is from a call to siglongjmp(3) , sigsetjmp() returns a non-zero value.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
The distinction between setjmp ()/ longjmp () and
sigsetjmp ()/ siglongjmp () is only significant for
programs which use sigaction(3) ,
sigprocmask(3) or sigsuspend(3) .
FUTURE DIRECTIONS
None.
SEE ALSO
siglongjmp(3) , signal(3) , sigprocmask(3) , sigsuspend(3) , <setjmp.h> .
DERIVATION
Derived from the POSIX.1-1988 standard.