GRPC_SIGNAL_HANDLER_SET_NP
- Set the signal handler.
INTEGER FUNCTION GRPC_SIGNAL_HANDLER_SET_NP(SIGNO, HANDLER)
INTEGER SIGNO
INTEGER HANDLER
The GRPC_SIGNAL_HANDLER_SET_NP() function modifies signal dispositions for Ninf-G Client.
Procedures for signal handling differs according to environments and a signal to be processed.
Ninf-G has signal handling thread which supports the signals except SIGKILL, SIGSEGV, SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGIOT, SIGPIPE, SIGEMT, SIGSYS, SIGTRAP, SIGSTOP, SIGCONT and SIGWAITING.
If SIGNO is supported by a Ninf-G signal handling thread, HANDLER is called by the signal handling thread. Otherwise, HANDLER is called as a signal handler registered by sigaction().
Note: For pthread flavor on MacOS X, Ninf-G Client processes SIGSTP as well.
sig_handler is called as a signal handler registered by sigaction().
It is unsafe to call some system calls from the signal handler registered by sigaction(). A list of safe system calls is available on the following web page and IEEE Std 1003.1(POSIX).
http://www.opengroup.org/onlinepubs/007908799/xsh/sigaction.html
This function is MT-safe.
If successful, GRPC_NO_ERROR is returned. In the case of an error, Error code is returned.
GRPC_NOT_INITIALIZED
GRPC_OTHER_ERROR_CODE