On Fri, 21 Apr 2023 21:43:39 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

> ProcessTools.startProcess() creates process and read it's output error 
> streams. So the any other using of corresponding Process.getInputStream() and 
> Process.getErrorStream() doesn't get process streams.
> 
> This fix preserve process streams content and allow to read reuse the date. 
> The ByteArrayOutputStream is used as a buffer. 
> It stores all process output, never trying to clean date which has been read. 
> 
> The regression test has been provided with issue.
> 
> I closed previous PR https://github.com/openjdk/jdk/pull/13560 by mistake 
> instead of updating it.
> 
> I run all tests to ensure that no failures are introduced.

This pull request has now been integrated.

Changeset: 2e340e85
Author:    Leonid Mesnik <lmes...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/2e340e855b760e381793107f2a4d74095bd40199
Stats:     211 lines in 3 files changed: 199 ins; 2 del; 10 mod

8233725: ProcessTools.startProcess() has output issues when using an 
OutputAnalyzer at the same time

Reviewed-by: cjplummer, sspitsyn

-------------

PR: https://git.openjdk.org/jdk/pull/13594

Reply via email to