Admin Production rocket
Current Publication

cobpostsighandler

Enterprise Developer for Eclipse (including UNIX Components) V7.0
Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.

cobpostsighandler

Adds the specified handler to the list of handlers for the specified signal, at the specified priority.
Restriction: This function is supported for native COBOL only.

Syntax:

#include "cobsignal.h"

cobsigtype_t cobpostsighandler (int signal, int priority, 
    PFI_SIG handler); 

Parameters:

signal Signal number, as defined in the <signal.h> include file.
priority The priority of handler in the range 1 to 254, where 254 is the highest priority. Values 127 and 129 through 139 are reserved for our use.
handler Address of your signal handler. This must be a C function that returns an integer value.

Comments:

  • This function adds the specified handler to the list of handles for the specified signal, at the specified priority.
  • This function returns a pointer that you can use to remove your signal handler later. If the return value is NULL, a signal handler was not posted for this signal. This could be due to lack of memory or the signal being disabled by the signal_regime run-time tunable.
  • Refer to cobsignal.h for the definition of PFI_SIG, which defines the additional information that is passed to your handler.

Equivalent COBOL Syntax:

None.