Guardian C Library Calls Reference Manual

signal
3-164 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
Example
#include <stdioh>
FILE *fp;
char buf[BUFSIZ];
int ret_value;
fp = fopen("$x.y.file1", "r+");
ret_value = setvbuf(fp, buf, _IOLBF, BUFSIZ);
signal
The signal function associates signal handlers with specific signals.
sig
is a specific signal. The signals are defined as symbolic constants in the header
signalh such that an integer value is associated with each signal. The possible signals
are described in the Usage Guidelines.
func
is a pointer to the signal handler.
Return Value
If successful, the signal function returns the pointer value func for the most recent
call to the signal function where the same first argument sig was specified.
Otherwise, the value of SIG_ERR is returned.
#include <signalh>
void (*signal(int sig, void (*func) (int)))(int);