summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-12-14 22:41:10 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-12-14 22:41:10 +0000
commit893cac140232478e3ce9640ccf31dbfbfc2434c0 (patch)
tree5965f7368afbadc28f70a768e774e5574987b5c6 /src/libmain
parent23bf700196b4fa05a2da55798644f8adc2e1d7b1 (diff)
downloadguix-893cac140232478e3ce9640ccf31dbfbfc2434c0.tar.gz
* Remove the terminate handler, which was only really needed because
  of Berkeley DB (see r8632).

Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 9076e99947..d3b73f8fd5 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -90,23 +90,6 @@ static void setLogType(string lt)
 }
 
 
-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 @@ static void initAndRun(int argc, char * * argv)
        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. */