The acu_abend() function allows you to perform the ACUCOBOL-GT signal handling logic in selected programs when the runtime is initialized with the "--no-signal-handlers" option. If you run with "--no-signal-handlers", error conditions that raise signals are not detected automatically by the runtime. acu_abend() causes the runtime to output error messages and resets the state of the runtime. This function is designed for use in transaction processing environments that call the ACUCOBOL-GT runtime from a C main program.
Refer to the ACUCOBOL-GT User's Guide for more information on "--no-signal-handlers".
C programs that specify the "--no-signal-handlers" option in the call to acu_initv() may call the acu_abend() function from their own signal-handling code as follows:
void acu_abend( int signal_number )
where signal_number is the signal number or "-1" if no signal information is available.
Although you can call acu_abend() at any time, we recommend that you call it only if the application was executing COBOL code when the signal occurred; otherwise, the error messages reported by the runtime may be misleading. For example, you do not need to call acu_abend() if:
acu_abend() does not shut down the runtime. It reports the current COBOL program and execution address. It also reports the COBOL source file and line number if you have compiled with "-Gl" or "-Ga". It then resets the runtime to its initial state. Therefore, even if you have called acu_abend(), you still need to call acu_shutdown() to actually shut down the runtime.