From 9382a7e64a8f1cf142e196194e586c743f266438 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sat, 14 Sep 2019 05:51:40 +1200 Subject: [PATCH] Detach externals so they don't freeze while buffering --- src/commands/classified.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/classified.rs b/src/commands/classified.rs index 277a925341..2b733c88ef 100644 --- a/src/commands/classified.rs +++ b/src/commands/classified.rs @@ -307,10 +307,12 @@ impl ExternalCommand { Ok(ClassifiedInputStream::new()) } StreamNext::External => { + let _ = popen.detach(); let stdout = popen.stdout.take().unwrap(); Ok(ClassifiedInputStream::from_stdout(stdout)) } StreamNext::Internal => { + let _ = popen.detach(); let stdout = popen.stdout.take().unwrap(); let file = futures::io::AllowStdIo::new(stdout); let stream = Framed::new(file, LinesCodec {});