about summary refs log tree commit diff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2012-03-13T16·07+0100
committerEelco Dolstra <e.dolstra@tudelft.nl>2012-03-13T16·07+0100
commitbd50c01972718167cf86d20dcd9c928b4c3cfbd8 (patch)
treef87b9dc31dc188d8f56e08ea0abf26a3ac7258e8 /src/libmain/shared.cc
parentb461721f17d7104c7ef08a0840d80685b9ae853e (diff)
Ensure that Perl processes delete their entry in the temproots directory
By moving the destructor object to libstore.so, it's also run when
download-using-manifests and nix-prefetch-url exit.  This prevents
them from cluttering /nix/var/nix/temproots with stale files.
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 99ac198ca356..d39816586404 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -90,12 +90,6 @@ static void setLogType(string lt)
 }
 
 
-RemoveTempRoots::~RemoveTempRoots()
-{
-    removeTempRoots();
-}
-
-
 static bool showTrace = false;
 
 
@@ -217,10 +211,6 @@ static void initAndRun(int argc, char * * argv)
     verbosityDelta += queryIntSetting("verbosity", lvlInfo);
     verbosity = (Verbosity) (verbosityDelta < 0 ? 0 : verbosityDelta);
     
-    /* Automatically clean up the temporary roots file when we
-       exit. */
-    RemoveTempRoots removeTempRoots __attribute__((unused));
-
     run(remaining);
 
     /* Close the Nix database. */