aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/ssh-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-09-23 18:01:04 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-09-23 18:01:04 +0200
commitea9df6fe51cf52a8e9106cd62a195bf185e6c5f6 (patch)
treec12655934b083171bc7512e1796761c99c2a2606 /src/libstore/ssh-store.cc
parent994348e9e070a07d9f86ce876415f5484e5b7e66 (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/ssh-store.cc')
-rw-r--r--src/libstore/ssh-store.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc
index f2caf2aeb..bb03daef4 100644
--- a/src/libstore/ssh-store.cc
+++ b/src/libstore/ssh-store.cc
@@ -57,6 +57,11 @@ private:
struct Connection : RemoteStore::Connection
{
std::unique_ptr<SSHMaster::Connection> sshConn;
+
+ void closeWrite() override
+ {
+ sshConn->in.close();
+ }
};
ref<RemoteStore::Connection> openConnection() override;