raise | function |
int raise (signal sig); |
<csignal> |
Generates a signal
Sends signal sig to the current executing program.
Parameters
- sig
- The signal number to send. The following macro constant expressions identify standard signal numbers:
macro signal SIGABRT (Signal Abort) Abnormal termination, such as is initiated by the abort function. SIGFPE (Signal Floating-Point Exception) Erroneous arithmetic operation, such as zero divide or an operation resulting in overflow (not necessarily with a floating-point operation). SIGILL (Signal Illegal Instruction) Invalid function image, such as an illegal instruction. This is generally due to a corruption in the code or to an attempt to execute data. SIGINT (Signal Interrupt) Interactive attention signal. Generally generated by the application user. SIGSEGV (Signal Segmentation Violation) Invalid access to storage: When a program tries to read or write outside the memory it is allocated for it. SIGTERM (Signal Terminate) Termination request sent to program. Each compiler implentation may provide additional signal number macro constants to be used by this function.
Return Value
Returns zero if successful, and a value different from zero otherwise.See also
signal | Set function to handle signal (function) |