forked from lix-project/lix
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.
This commit is contained in:
parent
e6e495649c
commit
8fbe96cb31
|
@ -141,6 +141,7 @@ void RemoteStore::connectToDaemon()
|
||||||
fdSocket = socket(PF_UNIX, SOCK_STREAM, 0);
|
fdSocket = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||||
if (fdSocket == -1)
|
if (fdSocket == -1)
|
||||||
throw SysError("cannot create Unix domain socket");
|
throw SysError("cannot create Unix domain socket");
|
||||||
|
closeOnExec(fdSocket);
|
||||||
|
|
||||||
string socketPath = settings.nixStateDir + DEFAULT_SOCKET_PATH;
|
string socketPath = settings.nixStateDir + DEFAULT_SOCKET_PATH;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue