nix-daemon: Close unnecessary fd

This commit is contained in:
Eelco Dolstra 2014-09-25 18:45:43 +02:00 committed by Ludovic Courtès
parent e74390a16f
commit 6092a48603
1 changed files with 2 additions and 0 deletions

View File

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