mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Add convenience function for connecting to a Unix domain socket
This commit is contained in:
parent
5b4806ab3c
commit
0087188d47
3 changed files with 15 additions and 3 deletions
|
@ -83,9 +83,7 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection()
|
|||
auto conn = make_ref<Connection>();
|
||||
|
||||
/* Connect to a daemon that does the privileged work for us. */
|
||||
conn->fd = createUnixDomainSocket();
|
||||
|
||||
nix::connect(toSocket(conn->fd.get()), config->path);
|
||||
conn->fd = nix::connect(config->path);
|
||||
|
||||
conn->from.fd = conn->fd.get();
|
||||
conn->to.fd = conn->fd.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue