]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3823: main: Disable watchdog when Snort 3 process exits gracefully
authorShanmugam S (shanms) <shanms@cisco.com>
Tue, 16 May 2023 06:31:14 +0000 (06:31 +0000)
committerShanmugam S (shanms) <shanms@cisco.com>
Tue, 16 May 2023 06:31:14 +0000 (06:31 +0000)
Merge in SNORT/snort3 from ~AMUTTUVA/snort3:watchdog_quit_master to master

Squashed commit of the following:

commit 05fbd9ecb7a8225b8c573e90954ed0c343abed91
Author: Akhilesh MY <amuttuva@cisco.com>
Date:   Tue Apr 25 02:03:45 2023 -0400

    main: Disable watchdog when Snort 3 process exits gracefully

src/main.cc

index da07634e7f5d8af0c91265636a3286456c748f95..22345410b50d6506ce887d8d7ed88648c615d655 100644 (file)
@@ -731,6 +731,10 @@ int main_dump_plugins(lua_State*)
 int main_quit(lua_State* L)
 {
     ControlConn* ctrlcon = ControlConn::query_from_lua(L);
+    SnortConfig* sc = SnortConfig::get_main_conf();
+    // Disable watchdog when process stops
+    if (sc)
+        sc->set_watchdog(0);
     send_response(ctrlcon, "== stopping\n");
     main_broadcast_command(new ACStop(), ctrlcon);
     exit_requested = true;