Signals invalid access to storage.
Include
<signal.h>
Prototype
#define SIGSEGV
Remarks
SIGSEGV
is used as an argument for raise
and/or
signal
. When used, the default behavior is to print an invalid
storage request message and terminate the calling program. This may be overridden by a
user function that defines the signal handler actions. See signal
for
an example of a user-defined function.
Example
#include <signal.h> /* for raise, SIGSEGV */
#include <stdio.h> /* for printf */
int main(void)
{
raise(SIGSEGV);
printf("Program never reaches here.");
}
Example Output
SEGV
where SEGV
stands for “invalid storage access.”