Sets jump point for a nonlocal goto.
Format
#include <setjmp.h>
init sigsetjmp (sigjmp_buf env, int savemask);
Arguments
- env
- An address for a sigjmp_buf structure.
- savemask
- An integer value that specifies whether you need to save the
current signal mask.
Description
This function saves its calling environment in its
env argument for later use by the siglongjmp function.
If the value of savemask is not 0 (zero), sigsetjmp also
saves the process' current signal mask as part of the calling
environment.
See also siglongjmp in this section.
Restrictions
You cannot invoke the longjmp function from an OpenVMS
condition handler. However, you may invoke longjmp from a signal
handler that has been established for any signal supported by the
DEC C RTL, subject to the following nesting
restrictions:
- The longjmp function will not work if you invoke it from
nested signal handlers. The result of the longjmp function,
when invoked from a signal handler that has been entered as a
result of an exception generated in another signal handler, is
undefined.
- Do not invoke the sigsetjmp function from a signal handler
unless the associated longjmp is to be issued before the handling
of that signal is completed.
- Do not invoke the longjmp function from within an exit
handler (established with atexit or SYS$DCLEXH). Exit handlers
are invoked after image tear-down, so the destination address of
the longjmp no longer exists.
- Invoking longjmp from within a signal handler to return
to the main thread of execution might leave your program in
an inconsistent state. Possible side effects include the
inability to perform I/O or to receive any more UNIX signals.
Use siglongjmp instead.
Return Values
0 | Indicates success. |
nonzero | The return is a call to the
siglongjmp function. |
Previous Page | Next Page | Table of Contents | Index