raise

Description

Sends a signal to the executing program.

#include <signal.h>

int raise( int sig);

sig Signal to be raised  

Remarks

The raise function sends sig to the executing program. If a signal-handling routine for sig has been installed by a prior call to signal, raise causes that routine to be executed. If no handler routine has been installed, the default action (as listed below) is taken.

The signal value sig can be one of the following manifest constants:

Signal Meaning Default

SIGABRT Abnormal termination. Terminates the calling program with exit code 3.
SIGFPE Floating-point error. Terminates the calling program.
SIGILL Illegal instruction. This signal is not generated by DOS, but is supported for ANSI compatibility. Terminates the calling program.
SIGINT CTRL+ C interrupt. Issues INT23H.
SIGSEGV Illegal storage access. This signal is not generated by DOS, but is supported for ANSI compatibility. Terminates the calling program.
SIGTERM Termination request sent to the program. This signal is not generated by DOS, but is supported for ANSI compatibility., Ignores the signal.  

Return Value

If successful, the raise function returns 0. Otherwise, it returns a nonzero value.

Compatibility

Standards:ANSI

16-Bit:DOS, QWIN, WIN, WIN DLL

32-Bit:DOS32X

See Also

abort, signal

Example

See the example for signal.