about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-19T16·07+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-19T16·07+0100
commit1256ab3b446d8e35225c36e71abb50ee964ea050 (patch)
tree6cca5bb797379a3966aa9ec92fc48fc3f73266fe /src/libstore/gc.cc
parented306febb586a005b86a0ade2485c3c932698314 (diff)
Clean up temp roots in a more C++ way
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index ebee4859f8..0806430efe 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -145,11 +145,6 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath,
 }
 
 
-/* The file to which we write our temporary roots. */
-static Path fnTempRoots;
-static AutoCloseFD fdTempRoots;
-
-
 void LocalStore::addTempRoot(const Path & path)
 {
     /* Create the temporary roots file for this process. */
@@ -204,27 +199,6 @@ void LocalStore::addTempRoot(const Path & path)
 }
 
 
-void removeTempRoots()
-{
-    if (fdTempRoots != -1) {
-        fdTempRoots.close();
-        unlink(fnTempRoots.c_str());
-    }
-}
-
-
-/* Automatically clean up the temporary roots file when we exit. */
-struct RemoveTempRoots
-{
-    ~RemoveTempRoots()
-    {
-        removeTempRoots();
-    }
-};
-
-static RemoveTempRoots autoRemoveTempRoots __attribute__((unused));
-
-
 typedef std::shared_ptr<AutoCloseFD> FDPtr;
 typedef list<FDPtr> FDs;