Author: eelco
Date: Wed Dec 14 22:41:10 2011
New Revision: 30898
URL: https://nixos.org/websvn/nix/?rev=30898&sc=1

Log:
* Remove the terminate handler, which was only really needed because
  of Berkeley DB (see r8632).

Modified:
   nix/trunk/src/libmain/shared.cc

Modified: nix/trunk/src/libmain/shared.cc
==============================================================================
--- nix/trunk/src/libmain/shared.cc     Wed Dec 14 22:31:31 2011        (r30897)
+++ nix/trunk/src/libmain/shared.cc     Wed Dec 14 22:41:10 2011        (r30898)
@@ -90,23 +90,6 @@
 }
 
 
-static void closeStore()
-{
-    try {
-        throw;
-    } catch (std::exception & e) {
-        printMsg(lvlError,
-            format("FATAL: unexpected exception (closing store and aborting): 
%1%") % e.what());
-    }
-    try {
-        store.reset((StoreAPI *) 0);
-    } catch (...) {
-        ignoreException();
-    }
-    abort();
-}
-
-
 RemoveTempRoots::~RemoveTempRoots()
 {
     removeTempRoots();
@@ -238,12 +221,6 @@
        exit. */
     RemoveTempRoots removeTempRoots __attribute__((unused));
 
-    /* Make sure that the database gets closed properly, even if
-       terminate() is called (which happens sometimes due to bugs in
-       destructor/exceptions interaction, but that needn't preclude a
-       clean shutdown of the database). */
-    std::set_terminate(closeStore);
-    
     run(remaining);
 
     /* Close the Nix database. */
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to