DEFER INTERRUPT / QUIT
The DEFER instruction defines the program behavior when interrupt or
quit signals are received.
Syntax
DEFER { INTERRUPT | QUIT }Usage
The DEFER instruction controls the behavior of the program when an interrupt
signal (SIGINT) or quit signal (SIGQUIT) has been received.
DEFER INTERRUPT and DEFER QUIT instructions should
only be used in the MAIN
block, to be executed at the beginning of the program.
DEFER INTERRUPT indicates that the program must continue when it receives an
interrupt signal (SIGINT. By default, the program stops when receiving an interrupt
signal.
Once deferred, you cannot reset to the default behavior.
When an interrupt signal is caught by the runtime system and DEFER INTERRUPT is
used, the int_flag predefined
global variable is set to TRUE by the runtime system.
Interrupt signals are raised on terminal consoles when the user presses a key like CTRL-C,
depending on the stty configuration. When a program is displayed through a front-end, no terminal
console is used; therefore, users cannot send interrupt signals with the CTRL-C key. To send an
interruption request from the front-end, you must define an action view with the name
'interrupt'.
DEFER QUIT indicates that the program must continue when it receives a quit
signal (SIGQUIT). By default, the program stops when receiving a quit signal.
When a quit signal is caught by the runtime system and DEFER QUIT is used, the
quit_flag predefined global
variable is set to TRUE by the runtime system.