XL Fortran for AIX 8.1

Language Reference

+-------------------------------IBM Extension--------------------------------+


SIGNAL(I, PROC)

The SIGNAL procedure allows a program to specify a procedure to be invoked upon receipt of a specific operating-system signal.

I
is an integer that specifies the value of the signal to be acted upon. It is an INTENT(IN) argument. Available signal values are defined in the C include file signal.h; a subset of signal values is defined in the Fortran include file fexcp.h.

PROC
specifies the user-defined procedure to be invoked when the process receives the specified signal (I). It is an INTENT(IN) argument.

Class

Subroutine

Examples

      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)
      ...

Related Information

See the signal subroutine in the Technical Reference: Base Operating System and Extensions Volume 1 for details about the underlying implementation.

The "-qsigtrap Option" in the User's Guide allows you to set a handler for SIGTRAP signals through a compiler option.

+----------------------------End of IBM Extension----------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]