Intel® Fortran Compiler 16.0 User and Reference Guide

Signal Handling (Linux* and OS X* only)

A signal is an abnormal event generated by one of various sources, such as:

You can optionally set certain events to issue signals, for example:

Some signals terminate the receiving process if no action is taken (optionally creating a core file), while others are simply ignored unless the process has requested otherwise.

Except for certain signals, calling the signal or sigaction routine allows specified signals to be ignored or causes an interrupt (transfer of control) to the location of a user-written signal handler.

You can establish one of the following actions for a signal with a call to signal:

Calling the signal routine lets you change the action for a signal, such as intercepting an operating system signal and preventing the process from being stopped.

The table below shows the signals that the Intel® Fortran RTL arranges to catch when a program is started:

Signal

Intel® Fortran RTL message

SIGFPE

Floating-point exception (number 75)

SIGINT

Process interrupted (number 69)

SIGIOT

IOT trap signal (number 76)

SIGQUIT

Process quit (number 79)

SIGSEGV

Segmentation fault (number 174)

SIGTERM

Process killed (number 78)

Calling the signal routine (specifying the numbers for these signals) results in overwriting the signal-handling facility set up by the Intel® Fortran RTL. The only way to restore the default action is to save the returned value from the first call to signal.

When using a debugger, it may be necessary to enter a command to allow the Intel® Fortran RTL to receive and handle the appropriate signals.