Application termination

The OPTIONS TERMINATE SIGNAL defines a callback function in case of SIGTERM signal.

Syntax

OPTIONS ON TERMINATE SIGNAL CALL function

Usage

The OPTIONS ON TERMINATE SIGNAL CALL function defines the function that must be called when the application receives the SIGTERM signal.

With this option, you can control program termination. If this statement is not called, the program is stopped with an exit value of SIGTERM (15).

Important: This feature is only supported on UNIX-like operating systems.

Use the OPTIONS ON TERMINATE SIGNAL CALL function instruction with care, and do not execute complex code in the callback function. The code is expected to contain only simple and short cleanup operations; any interactive instruction must be avoided.