1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00

nix-daemon: Close unnecessary fd

This commit is contained in:
Eelco Dolstra 2014-09-25 18:45:43 +02:00
parent 0ed1b924be
commit 9b146a52f1

View file

@ -767,6 +767,8 @@ static void daemonLoop(char * * argv)
/* Fork a child to handle the connection. */ /* Fork a child to handle the connection. */
startProcess([&]() { startProcess([&]() {
fdSocket.close();
/* Background the daemon. */ /* Background the daemon. */
if (setsid() == -1) if (setsid() == -1)
throw SysError(format("creating a new session")); throw SysError(format("creating a new session"));