aboutsummaryrefslogtreecommitdiff
path: root/src/nix-worker
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-12-02 16:41:36 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-12-02 16:41:36 +0000
commite25fad691aa3ccb492c4fb8840289f76151e553e (patch)
tree1610455ac3d4d1d0b992f56e10825cf91e1445e5 /src/nix-worker
parent30bf547f4f5bc881eb60c9e11020d077fbb8b899 (diff)
* Move addTempRoot() to the store API, and add another function
syncWithGC() to allow clients to register GC roots without needing write access to the global roots directory or the GC lock.
Diffstat (limited to 'src/nix-worker')
-rw-r--r--src/nix-worker/main.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nix-worker/main.cc b/src/nix-worker/main.cc
index 95077e653..fef2c2958 100644
--- a/src/nix-worker/main.cc
+++ b/src/nix-worker/main.cc
@@ -127,6 +127,19 @@ void processConnection(Source & from, Sink & to)
break;
}
+ case wopAddTempRoot: {
+ Path path = readStorePath(from);
+ store->addTempRoot(path);
+ writeInt(1, to);
+ break;
+ }
+
+ case wopSyncWithGC: {
+ store->syncWithGC();
+ writeInt(1, to);
+ break;
+ }
+
default:
throw Error(format("invalid operation %1%") % op);
}