From ea9df6fe51cf52a8e9106cd62a195bf185e6c5f6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 23 Sep 2021 18:01:04 +0200 Subject: 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. --- src/libstore/ssh-store.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstore/ssh-store.cc') 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 sshConn; + + void closeWrite() override + { + sshConn->in.close(); + } }; ref openConnection() override; -- cgit v1.2.3