Skip to content
Snippets Groups Projects
Commit 873e419c authored by murgatroid99's avatar murgatroid99
Browse files

Added explanation about handling signals in C

parent 6bbe3694
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,10 @@ static void (*old_sigterm_handler)(int); ...@@ -44,6 +44,10 @@ static void (*old_sigterm_handler)(int);
static volatile bool signal_received = false; static volatile bool signal_received = false;
/* This has to be handled at the C level instead of Ruby, because Ruby signal
* handlers are constrained to run in the main interpreter thread. If that main
* thread is blocked on grpc_completion_queue_pluck, the signal handlers will
* never run */
static void handle_signal(int signum) { static void handle_signal(int signum) {
signal_received = true; signal_received = true;
if (signum == SIGINT) { if (signum == SIGINT) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment