signal_regime

Specifies whether or not the COBOL Run-Time System is to post its own signal handlers.
Restriction: These tunables are supported for native COBOL only.

Syntax:

>>-----set signal_regime(sig)=integer---------><

or

>>-----set signal_regime=1---------><
                           

Parameters:

sig The number of the signal, between 1 and the maximum signal number on your operating system. See your operating system documentation for details on signal numbers.
integer The action the run-time system is to take for the signal sig. integer can take one of the following values:
0 - The signal handler for signal sig is used if needed
By default, the run-time system sets up signal handlers for all signals whose operating system default action would cause termination. The run-time system can thus catch these signals and tidy up (for example, close any open files to prevent file corruption) before exiting.
1 - The signal handler for signal sig is used only if a handler was not already posted for this signal
This is useful if the third-party software is invoked before your COBOL system and sets up a handler for signal sig. If this tunable is not set for this signal, the run-time system overwrites the third-party software's handler with its own; this leads to unpredictable behavior, such as run-time system error 115 ("Unexpected signal") being produced.

If a handler was posted, the run-time system will not post any handlers for this signal and so any run-time system functionality which relies on this signal will not work.

2 - The signal handler for signal sig is used
This is only of use if the third-party software is invoked after the run-time system and sets up a handler for signal sig. Use of this setting is strongly discouraged for any signal whose operating system default action is to cause termination; if this signal is received between the run-time system being invoked and the third-party software setting up its handler, the default action of the operating system occurs, and the process exits without the run-time system being able to tidy up. This could lead to problems such as file corruption.

Any run-time system functionality which relies on this signal will not work.

Properties:

Default: 0 for all signals
IDE equivalent: Project > Properties > Micro Focus > Run-time Configuration > Signal Handling > Signal handling options

Comments:

If you use the alternative syntax (set signal_regime=1), the signal regime for all signals is set to 1.