]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2453 in SNORT/snort3 from ~STECHEW/snort3:move_term_signal to...
authorSteve Chew (stechew) <stechew@cisco.com>
Fri, 4 Sep 2020 19:19:07 +0000 (19:19 +0000)
committerSteve Chew (stechew) <stechew@cisco.com>
Fri, 4 Sep 2020 19:19:07 +0000 (19:19 +0000)
Squashed commit of the following:

commit b3e7752fee4aa1b2d81af24ca37b39500f7f899f
Author: Steve Chew <stechew@cisco.com>
Date:   Wed Sep 2 14:50:51 2020 -0400

    main: Turn off signal handlers later to catch more during snort shutdown.

src/main/snort.cc

index 432cbf5c510b29ceb44fe1848eba704f8808e331..4c41f416941d53c4814c7c9bc9989ef654dfa7e7 100644 (file)
@@ -310,15 +310,14 @@ void Snort::term()
     static bool already_exiting = false;
     if ( already_exiting )
         return;
+    already_exiting = true;
 
     const SnortConfig* sc = SnortConfig::get_conf();
 
-    already_exiting = true;
     initializing = false;  // just in case we cut out early
 
     memory::MemoryCap::print();
 
-    term_signals();
     IpsManager::global_term(sc);
     HostAttributesManager::term();
 
@@ -365,6 +364,7 @@ void Snort::term()
     ModuleManager::term();
     PluginManager::release_plugins();
     ScriptManager::release_scripts();
+    term_signals();
 }
 
 void Snort::clean_exit(int)