To override the default run-time library exception handler, your application must call signal to change the action for the signal of interest.
For example, assume that you want to change the signal action to cause your application to call abort() and generate a core file.
The following example adds a function named clear_signal_ to call signal() and change the action for the SIGABRT signal:
signal (SIGABRT, SIG_DFL);
A call to the clear_signal() local routine must be added to main. Make sure that the call appears before any call to the local myabort() routine:
i = 3
if (i < 5) then