VMS Help  —  CRTL  sigsetjmp
    Sets a jump point for a nonlocal goto.

    Format

      #include  <setjmp.h>

      init sigsetjmp  (sigjmp_buf env, int savemask);

1  –  Arguments

 env

    An address for a sigjmp_buf structure.

 savemask

    An integer value that specifies whether you need to save the
    current signal mask.

2  –  Description

    The sigsetjmp 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's current signal mask as part of the calling
    environment.

    See also siglongjmp.

3  –  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
    Compaq C RTL, subject to the following nesting restrictions:

    o  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.

    o  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.

    o  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.

    o  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.

4  –  Return Values

    0                  Indicates success.
    nonzero            The return is a call to the siglongjmp
                       function.
Close Help