aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 048f5c603..25a955e09 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -8,6 +8,7 @@
#include "util.hh"
#include "serve-protocol.hh"
#include "worker-protocol.hh"
+#include "monitor-fd.hh"
#include <iostream>
#include <algorithm>
@@ -879,6 +880,8 @@ 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");