diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-06-14 16:03:02 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-06-14 16:03:02 +0000 |
commit | f351834f77441e14238b3348cfe211fa6f6f4e3a (patch) | |
tree | a6cf4a7ab446029c2bb8bedb8e93a717f30fe8d6 /src | |
parent | 94fd46fa1c4655a609b3a67bef447c9547eb5080 (diff) |
* nix-worker: clean up the temporary root for the worker processes
in /nix/var/nix/temproots.
Diffstat (limited to 'src')
-rw-r--r-- | src/libmain/shared.cc | 15 | ||||
-rw-r--r-- | src/libmain/shared.hh | 5 | ||||
-rw-r--r-- | src/nix-worker/nix-worker.cc | 2 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 09841e45b..a67d2c470 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -70,15 +70,6 @@ static unsigned int getIntArg(const string & opt, } -struct RemoveTempRoots -{ - ~RemoveTempRoots() - { - removeTempRoots(); - } -}; - - void initDerivationsHelpers(); @@ -99,6 +90,12 @@ static void closeStore() } +RemoveTempRoots::~RemoveTempRoots() +{ + removeTempRoots(); +} + + /* Initialize and reorder arguments, then call the actual argument processor. */ static void initAndRun(int argc, char * * argv) diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh index a7e46c927..62f505189 100644 --- a/src/libmain/shared.hh +++ b/src/libmain/shared.hh @@ -33,6 +33,11 @@ extern volatile ::sig_atomic_t blockInt; MakeError(UsageError, nix::Error); +struct RemoveTempRoots +{ + ~RemoveTempRoots(); +}; + } diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 134e1a693..0d0964f3a 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -439,6 +439,8 @@ static void performOp(unsigned int clientVersion, static void processConnection() { + RemoveTempRoots removeTempRoots; /* unused variable - don't remove */ + canSendStderr = false; myPid = getpid(); writeToStderr = tunnelStderr; |