Third Party Software that Uses Signals

If you are using third party software that posts a signal handler using a C library signal routine, such as signal() or sigaction(), unexpected results may occur. For example, if the third party software posts its handler before COBOL has been invoked, then when COBOL is invoked the third party's handler might be overridden by a run-time system or COBOL handler. If the third party subsequently raises a signal, then a 115 error may occur.

To overcome this, you can use the run-time tunable signal_regime. This tunable can be used to prevent handlers from being posted by the COBOL Run-Time System for the specified signal, if a signal handler is posted before the first COBOL invocation.

If handlers are prevented from being posted for a signal, due to this tunable, the cobpostsighandler() routine returns NULL. Hence, the default run-time system handlers and any additional COBOL functionality achieved using the signal is not available. It also means that you should check the value returned from any cobpostsighandler() routine calls for NULL.

We recommend that you use the signal_regime tunable only when third party software is involved, or when the PL/I Run-Time System must be allowed to trap signals that would otherwise be intercepted by the COBOL Run-Time System. You should always use the cobpostsighandler() routine in your own code.