sigsetjmp [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume I
sigsetjmp
Save the current environment and signal mask.
Syntax
#include <setjmp.h>
int sigsetjmp (sigjmp_buf env, int savemask);
Parameters
env Returns the current environment for later use in a call to
siglongjmp(). If savemask is set to a non-zero value, the
current signal mask is also returned in env. The type
sigjmp_buf (defined in <setjmp.h>) defines an array of
unsigned integers. For this reason, the env argument does
not require an & operator.
savemask If a non-zero value is passed in savemask, the current
signal mask is returned in env. If zero is passed, the
current signal mask is not saved.
Description
A call to setsetjmp() creates an entry point in a program that can be
accessed via siglongjmp(). The sigsetjmp() macro saves the current
environment of the calling process in env. If savemask is set to a
non-zero value, the current signal mask is also saved in env. A
subsequent call to siglongjmp() requires that the env variable be passed
to restore the environment.
If a zero value is returned, the return is from sigsetjmp() itself and
not a return as a result of a call to siglongjmp().
If a nonzero value is returned, the return is a result of a call to
siglongjmp(). After siglongjmp() is completed, the program executes as
if the call to sigsetjmp() had returned a second time. In this case,
sigsetjmp() returns either the non-zero value passed in the val argument
of siglongjmp() or 1 if zero was passed in val.
Return Values
0 Successful completion of a call to sigsetjmp().
<>0 Successful completion of a call to siglongjmp(). The value
is that of the val parameter passed to siglongjmp(), or 1
if a zero was passed in the val parameter.
See Also
siglongjmp(), POSIX 1003.1 (Section 8.3.1)
MPE/iX 5.0 Documentation