summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-25 18:45:43 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-11 17:34:24 +0200
commit6092a48603ea7888f8a1f69db87835bc339c973a (patch)
tree12d24cdbdc26e153e2b9fc08147c328554c13c94
parente74390a16f74233283572661f64ed4f03ae1650d (diff)
downloadguix-6092a48603ea7888f8a1f69db87835bc339c973a.tar.gz
nix-daemon: Close unnecessary fd
-rw-r--r--nix/nix-daemon/nix-daemon.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc
index 9cfa343d63..e74074f2a3 100644
--- a/nix/nix-daemon/nix-daemon.cc
+++ b/nix/nix-daemon/nix-daemon.cc
@@ -904,6 +904,8 @@ static void daemonLoop()
 
             /* Fork a child to handle the connection. */
             startProcess([&]() {
+                fdSocket.close();
+
                 /* Background the daemon. */
                 if (setsid() == -1)
                     throw SysError(format("creating a new session"));