Library /sys$common/syshlp/helplib.hlb  —  CRTL  raise
    Generates a specified software signal. Generating a signal causes
    the action routine established by the signal, ssignal, or sigvec
    function to be invoked.

    Format

      #include  <signal.h>

      int raise  (int sig); (ANSI C)

      int raise  (int sig[, int sigcode]); (DEC C Extension)

1  –  Arguments

 sig

    The signal to be generated.

 sigcode

    An optional signal code, available only when not compiling in
    strict ANSI C mode. For example, signal SIGFPE-the arithmetic
    trap signal-has 10 different codes, each representing a different
    type of arithmetic trap.

    The signal codes can be represented by mnemonics or numbers. The
    arithmetic trap codes are represented by the numbers 1 to 10;
    the SIGILL codes are represented by the numbers 0 to 2. The code
    values are defined in the <signal.h> header file.

2  –  Description

    Calling the raise function has one of the following results:

    o  If raise specifies a sig argument that is outside the range
       defined in the <signal.h> header file, then the raise function
       returns 0, and the errno variable is set to EINVAL.

    o  If signal, ssignal, or sigvec establishes SIG_DFL (default
       action) for the signal, then the functions do not return. The
       image is exited with the OpenVMS error code corresponding to
       the signal.

    o  If signal, ssignal, or sigvec establishes SIG_IGN (ignore
       signal) as the action for the signal, then raise returns its
       argument, sig.

    o  signal, ssignal, or sigvec must establish an action function
       for the signal. That function is called and its return value
       is returned by raise.

    See also gsignal, signal, ssignal, and sigvec.

3  –  Return Values

    0                  If successful.
    nonzero            If unsuccessful.
Close Help