Guardian Programmer's Guide

Table Of Contents
Debugging, Trap Handling, and Signal Handling
Guardian Programmer’s Guide 421922-014
25 - 36
Examples
/* localHandler(). */
/* Code to deal with errors returned from worker(). */
}
/* Back once again in the domain of globalHandler()
installed by SIGACTION_INIT_(). */
/* SIGFPE generated here is caught by globalHandler() */
divider ( 5, 0 );
/* If traps are enabled, we shouldn't get here. */
printf( "main: second call to divider() failed to generate
signal\n" );
} else {
/* The siglongjmp() call in globalHandler() gets used
here. */
printf( "main: after sigsetjmp returned nonzero\n" );
}
}