Branch: refs/heads/master
Home: https://github.com/NixOS/nix
Commit: 154aa7f71ade55fe5ce43503ade85fc2a107a331
https://github.com/NixOS/nix/commit/154aa7f71ade55fe5ce43503ade85fc2a107a331
Author: Eelco Dolstra <[email protected]>
Date: 2012-04-14 (Sat, 14 Apr 2012)
Changed paths:
M src/nix-worker/nix-worker.cc
Log Message:
-----------
Set a few more close-on-exec flags
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index a952523..4b0c9e3 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -697,6 +697,8 @@ static void daemonLoop()
if (fdSocket == -1)
throw SysError("cannot create Unix domain socket");
+ closeOnExec(fdSocket);
+
string socketPath = nixStateDir + DEFAULT_SOCKET_PATH;
createDirs(dirOf(socketPath));
@@ -751,6 +753,8 @@ static void daemonLoop()
throw SysError("accepting connection");
}
+ closeOnExec(remote);
+
/* Get the identity of the caller, if possible. */
uid_t clientUid = -1;
pid_t clientPid = -1;
================================================================
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits