Sends a signal to the executing program.
int raise( int sig );
| Routine | Required Header | Compatibility |
| raise | <signal.h> | ANSI, Win 95, Win NT |
For additional compatibility information, see Compatibility in the Introduction.
Libraries
| LIBC.LIB | Single thread static library, retail version |
| LIBCMT.LIB | Multithread static library, retail version |
| MSVCRT.LIB | Import library for MSVCRT.DLL, retail version |
Return Value
If successful, raise returns 0. Otherwise, it returns a nonzero value.
Parameter
sig
Signal to be raised
Remarks
The raise function sends sig to the executing program. If a previous call to signal has installed a signal-handling function for sig, raise executes that function. If no handler function has been installed, the default action associated with the signal value sig is taken, as follows.
| 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 | Terminates the calling program |
| SIGINT | CTRL+C interrupt | Terminates the calling program |
| SIGSEGV | Illegal storage access | Terminates the calling program |
| SIGTERM | Termination request sent to the program | Ignores the signal |