Visible to Intel only — GUID: GUID-824CF6F4-9C5C-4098-BE67-97F048DD6F53
Visible to Intel only — GUID: GUID-824CF6F4-9C5C-4098-BE67-97F048DD6F53
Override the Default Runtime Library Exception Handler
To override the default runtime library exception handler on Linux* and macOS, 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:
#include <signal.h> void clear_signal_() { signal (SIGABRT, SIG_DFL); } int myabort_() { abort(); return 0; }
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:
program aborts integer i call clear_signal() i = 3 if (i < 5) then call myabort() end if end