From 6bcec542e750d47d2f8588c2c19eef2d82bca19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 3 Jan 2016 08:31:53 +0000 Subject: [PATCH] Added function install_signal_handler() --- include/proxysql_glovars.hpp | 1 + lib/ProxySQL_GloVars.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/proxysql_glovars.hpp b/include/proxysql_glovars.hpp index e6486dbb1..f93457f56 100644 --- a/include/proxysql_glovars.hpp +++ b/include/proxysql_glovars.hpp @@ -60,6 +60,7 @@ class ProxySQL_GlobalVariables { void process_opts_pre(); void process_opts_post(); void parse(int argc, const char * argv[]); + void install_signal_handler(); }; /* diff --git a/lib/ProxySQL_GloVars.cpp b/lib/ProxySQL_GloVars.cpp index af68b8177..a16e04555 100644 --- a/lib/ProxySQL_GloVars.cpp +++ b/lib/ProxySQL_GloVars.cpp @@ -75,12 +75,14 @@ ProxySQL_GlobalVariables::ProxySQL_GlobalVariables() { opt->add((const char *)"",0,1,0,(const char *)"Administration Unix Socket",(const char *)"-S",(const char *)"--admin-socket"); confFile=new ProxySQL_ConfigFile(); +}; + +void ProxySQL_GlobalVariables::install_signal_handler() { signal(SIGTERM, term_handler); signal(SIGSEGV, crash_handler); signal(SIGABRT, crash_handler); signal(SIGPIPE, SIG_IGN); -}; - +} void ProxySQL_GlobalVariables::parse(int argc, const char * argv[]) { opt->parse(argc, argv);