diff options
Diffstat (limited to 'src/nix-worker')
-rw-r--r-- | src/nix-worker/main.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nix-worker/main.cc b/src/nix-worker/main.cc index c8abe14299cd..80db782e90ba 100644 --- a/src/nix-worker/main.cc +++ b/src/nix-worker/main.cc @@ -269,6 +269,15 @@ static void performOp(Source & from, Sink & to, unsigned int op) break; } + case wopAddIndirectRoot: { + Path path = absPath(readString(from)); + startWork(); + store->addIndirectRoot(path); + stopWork(); + writeInt(1, to); + break; + } + case wopSyncWithGC: { startWork(); store->syncWithGC(); @@ -473,6 +482,7 @@ void run(Strings args) else if (daemon) { if (setuidMode) throw Error("daemon cannot be started in setuid mode"); + chdir("/"); daemonLoop(); } |