From 01d56c1eeca497de247413a64a544605c53d9d41 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Aug 2012 22:34:46 -0400 Subject: Drop the block count in the garbage collector --- src/nix-worker/nix-worker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix-worker') diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 74a619c71d0a..80c0d50609c7 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -503,7 +503,7 @@ static void performOp(unsigned int clientVersion, writeStrings(results.paths, to); writeLongLong(results.bytesFreed, to); - writeLongLong(results.blocksFreed, to); + writeLongLong(0, to); // obsolete break; } -- cgit 1.4.1 From 4aa1e5c55484ac02d28883292ee5c5806f5e4664 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 22 Aug 2012 10:58:24 -0400 Subject: Receive reserveSpace before calling startWork() Otherwise we can get a SIGPOLL. Reported by Ludovic. --- src/nix-worker/nix-worker.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nix-worker') diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 80c0d50609c7..7099eb9eeb0d 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -619,6 +619,10 @@ static void processConnection() to.flush(); unsigned int clientVersion = readInt(from); + bool reserveSpace = true; + if (GET_PROTOCOL_MINOR(clientVersion) >= 11) + reserveSpace = readInt(from) != 0; + /* Send startup error messages to the client. */ startWork(); @@ -634,10 +638,6 @@ static void processConnection() throw Error("if you run `nix-worker' as root, then you MUST set `build-users-group'!"); #endif - bool reserveSpace = true; - if (GET_PROTOCOL_MINOR(clientVersion) >= 11) - reserveSpace = readInt(from) != 0; - /* Open the store. */ store = boost::shared_ptr(new LocalStore(reserveSpace)); -- cgit 1.4.1