Closed Tyrrrz closed 1 year ago
3.6.3 / master
If a process generates a lot of output (bigger than the buffer size for stdout/stderr), and that output is piped through PipeTarget.Merge(...) to multiple targets, and one of those targets throws, then the process hangs forever.
PipeTarget.Merge(...)
See below for code repro.
Origin issue: https://github.com/Tyrrrz/YoutubeDownloader/issues/343
// Arrange void HandleStdOut(string line) => throw new Exception("Expected exception"); var target = PipeTarget.Merge( PipeTarget.ToStream(Stream.Null), PipeTarget.ToDelegate(HandleStdOut) ); var cmd = Cli.Wrap("dotnet") .WithArguments(a => a .Add(Dummy.Program.FilePath) .Add("generate text") .Add("--target").Add("all") .Add("--lines").Add(100_000) ) | target; // Act & assert await Assert.ThrowsAnyAsync<Exception>(async () => await cmd.ExecuteAsync());
Version
3.6.3 / master
Details
If a process generates a lot of output (bigger than the buffer size for stdout/stderr), and that output is piped through
PipeTarget.Merge(...)
to multiple targets, and one of those targets throws, then the process hangs forever.See below for code repro.
Origin issue: https://github.com/Tyrrrz/YoutubeDownloader/issues/343
Steps to reproduce