From 8fbe96cb3154d5db11b15728ad037bed28f08aa9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 13 Sep 2012 14:46:37 -0400 Subject: RemoteStore::connectToDaemon(): Set close-on-exec flag This ensures that "nix-build --run-env" doesn't keep a connection to the worker open, preventing it from exiting. --- src/libstore/remote-store.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index d3c05f0df4b1..11712b48774b 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -141,6 +141,7 @@ void RemoteStore::connectToDaemon() fdSocket = socket(PF_UNIX, SOCK_STREAM, 0); if (fdSocket == -1) throw SysError("cannot create Unix domain socket"); + closeOnExec(fdSocket); string socketPath = settings.nixStateDir + DEFAULT_SOCKET_PATH; -- cgit 1.4.1