From f2554d051bef272ca627c84283fa8022df772fbb Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 2 Apr 2015 13:58:27 -0700 Subject: [PATCH] Revive proper SIGINT handling --- test/cpp/qps/worker.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index 378151c5711..b6830cc0557 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -71,6 +71,8 @@ using namespace gflags; static bool got_sigint = false; +static void sigint_handler(int x) {got_sigint = true;} + namespace grpc { namespace testing { @@ -248,6 +250,8 @@ int main(int argc, char** argv) { grpc_init(); ParseCommandLineFlags(&argc, &argv, true); + signal(SIGINT, sigint_handler); + grpc::testing::RunServer(); grpc_shutdown();