[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
86/376: nix-store --serve: Only monitor stdin during builds
From: |
Ludovic Courtès |
Subject: |
86/376: nix-store --serve: Only monitor stdin during builds |
Date: |
Wed, 28 Jan 2015 22:04:13 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit d7a92ed4a9faf8237322166656a2639d787cdeec
Author: Eelco Dolstra <address@hidden>
Date: Thu Jul 24 11:52:52 2014 +0200
nix-store --serve: Only monitor stdin during builds
Other operations cannot hang indefinitely (except when we're reading
from stdin, in which case we'll notice a client disconnect). But
monitoring works badly during compressed imports, since there the
client can close the connection before we've sent an ack.
http://hydra.nixos.org/build/12711638
---
src/nix-store/nix-store.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 25a955e..42012f2 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -880,8 +880,6 @@ static void opServe(Strings opFlags, Strings opArgs)
FdSource in(STDIN_FILENO);
FdSink out(STDOUT_FILENO);
- MonitorFdHup monitor(in.fd);
-
/* Exchange the greeting. */
unsigned int magic = readInt(in);
if (magic != SERVE_MAGIC_1) throw Error("protocol mismatch");
@@ -1002,6 +1000,7 @@ static void opServe(Strings opFlags, Strings opArgs)
}
case cmdBuildPaths: {
+
/* Used by build-remote.pl. */
if (!writeAllowed) throw Error("building paths is not
allowed");
PathSet paths = readStorePaths<PathSet>(in);
@@ -1016,6 +1015,7 @@ static void opServe(Strings opFlags, Strings opArgs)
int res = 0;
try {
+ MonitorFdHup monitor(in.fd);
store->buildPaths(paths);
} catch (Error & e) {
printMsg(lvlError, format("error: %1%") % e.msg());
- 80/376: Remove some dead code, (continued)
- 80/376: Remove some dead code, Ludovic Courtès, 2015/01/28
- 72/376: Remove dead code, Ludovic Courtès, 2015/01/28
- 81/376: Add some assertions, Ludovic Courtès, 2015/01/28
- 82/376: More debugging, Ludovic Courtès, 2015/01/28
- 85/376: tests/remote-builds.nix: Don't try cache.nixos.org, Ludovic Courtès, 2015/01/28
- 79/376: Remove some obsolete files, Ludovic Courtès, 2015/01/28
- 83/376: Fix bogus pass by reference, Ludovic Courtès, 2015/01/28
- 88/376: Refactor, Ludovic Courtès, 2015/01/28
- 87/376: tests/remote-builds.nix: Test failing build, Ludovic Courtès, 2015/01/28
- 89/376: build-remote.pl: Be less verbose on failing builds, Ludovic Courtès, 2015/01/28
- 86/376: nix-store --serve: Only monitor stdin during builds,
Ludovic Courtès <=
- 77/376: nix-daemon: Less verbosity, Ludovic Courtès, 2015/01/28
- 74/376: nix-daemon: Use a thread instead of SIGPOLL to catch client disconnects, Ludovic Courtès, 2015/01/28
- 99/376: install-nix-from-closure.sh: Install cacert, Ludovic Courtès, 2015/01/28
- 93/376: nix-copy-closure: Implement --gzip via ssh's -C flag, Ludovic Courtès, 2015/01/28
- 91/376: Remove obsolete SSH master connection code, Ludovic Courtès, 2015/01/28
- 100/376: Rename nixPath to __nixPath, Ludovic Courtès, 2015/01/28
- 95/376: Change the default for use-ssh-substituter to ‘true’, Ludovic Courtès, 2015/01/28
- 90/376: Implement nix-copy-closure --from via nix-store --serve, Ludovic Courtès, 2015/01/28
- 97/376: Remove outdated AUTHORS file, Ludovic Courtès, 2015/01/28
- 92/376: Fix NIX_SSHOPTS, Ludovic Courtès, 2015/01/28