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/remote-store.hh | |
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/remote-store.hh')
-rw-r--r-- | src/libstore/remote-store.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh index 8901c79fc..ac1eaa19e 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/remote-store.hh @@ -125,7 +125,6 @@ public: struct Connection { - AutoCloseFD fd; FdSink to; FdSource from; unsigned int daemonVersion; @@ -133,6 +132,8 @@ public: virtual ~Connection(); + virtual void closeWrite() = 0; + std::exception_ptr processStderr(Sink * sink = 0, Source * source = 0, bool flush = true); }; |