You can use signal handling in your application, especially if you are mixing COBOL and C in your application.
Signal Handling Overview
Posting Signal Handlers
Writing Signal Handlers
More than One Handler for the Same Signal
Converting Signal Handlers Written for the signal() Function
Third Party Software that Uses Signals
Mixed Language Programming