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"));