The SIGNAL procedure allows a program to specify a procedure to be invoked upon receipt of a specific operating-system signal.
Subroutine
INCLUDE 'fexcp.h'
INTEGER SIGUSR1
EXTERNAL USRINT
! Set exception handler to produce the traceback code.
! The SIGTRAP is defined in the include file fexcp.h.
! xl__trce is a procedure in the XL Fortran
! run-time library. It generates the traceback code.
CALL SIGNAL(SIGTRAP, XL__TRCE)
…
! Use user-defined procedure USRINT to handle the signal
! SIGUSR1.
CALL SIGNAL(SIGUSR1, USRINT)
…
The -qsigtrap option in the XL Fortran Compiler Reference allows you to set a handler for SIGTRAP signals through a compiler option.