]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- unload snappers early (not by global destructors)
authorArvin Schnell <aschnell@suse.de>
Mon, 23 Jul 2018 19:10:01 +0000 (21:10 +0200)
committerArvin Schnell <aschnell@suse.de>
Mon, 23 Jul 2018 19:10:01 +0000 (21:10 +0200)
server/MetaSnapper.cc
server/MetaSnapper.h
server/snapperd.cc

index dba3401d3b798aa22bd79f8df0952021bbcc04b2..f9b104afce2372d876b058577f1ee21de6150d8f 100644 (file)
@@ -200,6 +200,14 @@ MetaSnappers::init()
 }
 
 
+void
+MetaSnappers::unload()
+{
+    for (iterator it = entries.begin(); it != entries.end(); ++it)
+       it->unload();
+}
+
+
 MetaSnappers::iterator
 MetaSnappers::find(const string& config_name)
 {
index c370c03434f3bbffe62051859197e825a8e30c2a..da3090ceb8c754ae2424931fa03fb912077ac8f6 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) [2012-2015] Novell, Inc.
+ * Copyright (c) 2018 SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -123,6 +124,8 @@ public:
 
     void init();
 
+    void unload();
+
     typedef list<MetaSnapper>::iterator iterator;
     typedef list<MetaSnapper>::const_iterator const_iterator;
 
index 8623015d1c251bba06c92fa3bf4b3169bbcbf19e..13e563efd098b8a7b1b6f0316f159bc5166c9264 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) [2012-2015] Novell, Inc.
+ * Copyright (c) 2018 SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -286,5 +287,7 @@ main(int argc, char** argv)
 
     y2mil("Exiting");
 
+    meta_snappers.unload();
+
     return 0;
 }