grpc_signal_handler_set_np
- Set the signal handler.
grpc_error_t grpc_signal_handler_set_np(int sig_num, void (*sig_handler)(int))
int sig_num
void (*sig_handler)(int))
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 sig_num is supported by a Ninf-G signal handling thread, sig_handler is called by the signal handling thread. Otherwise, sig_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