about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-25T16·45+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-25T16·45+0200
commit9b146a52f1395633e0ef319cfbe0bc452a796330 (patch)
tree45e272cffcb7422a45f789350dce80d58258bb65
parent0ed1b924be879bb27ba5cdefdb96e26519bea40a (diff)
nix-daemon: Close unnecessary fd
-rw-r--r--src/nix-daemon/nix-daemon.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index 0f3235d76df8..8ec54e4580dc 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -767,6 +767,8 @@ static void daemonLoop(char * * argv)
 
             /* Fork a child to handle the connection. */
             startProcess([&]() {
+                fdSocket.close();
+
                 /* Background the daemon. */
                 if (setsid() == -1)
                     throw SysError(format("creating a new session"));