Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Default Console Event Handling

When the Fortran runtime system is initialized, it establishes a default console event handler through the SetConsoleCtrlHandler Windows API routine. The default handler will respond to the following event types:

  • CTRL_C_EVENT

  • CTRL_BREAK_EVENT

  • CTRL_CLOSE_EVENT

These event types will result in an orderly program abort with an appropriate diagnostic message. To disable this default call to SetConsoleCtrlHandler, set an environment variable named FOR_DISABLE_CONSOLE_CTRL_HANDLER to the value YES (Y or y), or TRUE (T or t), or a number greater than zero.

Other console events such as a CTRL_LOGOFF_EVENT or CTRL_SHUTDOWN_EVENT are not handled by the default handler. The handler is notified of these events but returns FALSE to the operating system. This allows an Intel® Visual Fortran application activated as a Windows* service to continue execution when a user logs off.