From 0d8e4dd46f37ba99320d4a18c1e99d8bade4e974 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 1 Jun 2021 15:39:36 +0100 Subject: [PATCH] otter cli: Shut down CookedStdout before proxying responses Signed-off-by: Ian Jackson --- src/bin/otter.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index f8310d9c..3a9147df 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -1932,7 +1932,7 @@ mod mgmtchannel_proxy { } #[throws(AE)] - fn call(SCCA{ ma, args,.. }:SCCA) { + fn call(SCCA{ out, ma, args,.. }:SCCA) { let args = parse_args::(args, &subargs, &ok_id, None); let mut chan = connect_chan(&ma)?; @@ -1945,6 +1945,8 @@ mod mgmtchannel_proxy { let mut read = read.into_stream()?; let mut write = write.into_stream()?; + drop(out); // do our own stdout + let tcmds = thread::spawn(move || { io_copy_interactive(&mut BufReader::new(io::stdin()), &mut write) .map_err(|e| match e { -- 2.30.2