HP C/iX Library Reference Manual (30026-90004)

Chapter 5 313
HP C/iX Library Function Descriptions
signal
raise(SIGSEGV);
printf ("did not raise SIGSEGV\n");
} else {
printf ("longjmp'ed back\n");
}
printf ("about to raise SIGTERM\n");
if (raise (SIGTERM))
printf ("could not raise SIGTERM\n");
/* else it should not get here.. */
}
void segv_handler (int sig)
{
printf ("Raised SIGSEGV: In handler\n");
longjmp (state0, 100); /* leap back */
}
void goodbye (int sig)
{
printf ("Raised SIGTERM: In handler\n");
exit (0);
}
See Also
raise(), exit(), abort(), ANSI C 4.7.1.1