diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-09-23 18:01:04 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-09-23 18:01:04 +0200 |
commit | ea9df6fe51cf52a8e9106cd62a195bf185e6c5f6 (patch) | |
tree | c12655934b083171bc7512e1796761c99c2a2606 /src/libstore/uds-remote-store.cc | |
parent | 994348e9e070a07d9f86ce876415f5484e5b7e66 (diff) |
Shut down write side before draining the read side
This is important if the remote side *does* execute
nix-store/nix-daemon successfully, but stdout is polluted
(e.g. because the remote user's bashrc script prints something to
stdout). In that case we have to shutdown the write side to force the
remote nix process to exit.
Diffstat (limited to 'src/libstore/uds-remote-store.cc')
-rw-r--r-- | src/libstore/uds-remote-store.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/uds-remote-store.cc b/src/libstore/uds-remote-store.cc index cac4fa036..cfadccf68 100644 --- a/src/libstore/uds-remote-store.cc +++ b/src/libstore/uds-remote-store.cc @@ -45,6 +45,12 @@ std::string UDSRemoteStore::getUri() } +void UDSRemoteStore::Connection::closeWrite() +{ + shutdown(fd.get(), SHUT_WR); +} + + ref<RemoteStore::Connection> UDSRemoteStore::openConnection() { auto conn = make_ref<Connection>(); |