Restriction: This function is supported for native COBOL only.


#include "cobsignal.h"

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


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.


This function posts 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.

Equivalent COBOL Syntax: