Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Sends a signal to the executing program.

int raise(
   int sig 


Signal to be raised.

Return Value

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


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


Routine Required header Compatibility
raise <signal.h> ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.

See Also

Process and Environment Control Routines | abort | signal | Run-Time Routines and .NET Framework Equivalents

© 2015 Microsoft