diff --git a/userspace/digwatch/digwatch.cpp b/userspace/digwatch/digwatch.cpp index b2ac05de..61635d56 100644 --- a/userspace/digwatch/digwatch.cpp +++ b/userspace/digwatch/digwatch.cpp @@ -27,13 +27,6 @@ extern "C" { #include "utils.h" #include -static bool g_terminate = false; - -static void signal_callback(int signal) -{ - g_terminate = true; -} - std::vector valid_output_names {"stdout", "syslog"}; @@ -74,11 +67,6 @@ void do_inspect(sinsp* inspector, while(1) { - if(g_terminate) - { - break; - } - res = inspector->next(&ev); if(res == SCAP_TIMEOUT) @@ -310,20 +298,6 @@ int digwatch_init(int argc, char **argv) } cout << "Using rules file " + config.m_rules_filename + "\n"; - if(signal(SIGINT, signal_callback) == SIG_ERR) - { - fprintf(stderr, "An error occurred while setting SIGINT signal handler.\n"); - result = EXIT_FAILURE; - goto exit; - } - - if(signal(SIGTERM, signal_callback) == SIG_ERR) - { - fprintf(stderr, "An error occurred while setting SIGTERM signal handler.\n"); - result = EXIT_FAILURE; - goto exit; - } - lua_main_filename = lua_dir + DIGWATCH_LUA_MAIN; if (!std::ifstream(lua_main_filename)) {