RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time [v2]
Leonid Mesnik
lmesnik at openjdk.org
Wed Apr 26 14:38:23 UTC 2023
> 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.
Leonid Mesnik has updated the pull request incrementally with two additional commits since the last revision:
- fixed
- renamed out to stdOut
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13594/files
- new: https://git.openjdk.org/jdk/pull/13594/files/782e9cd6..b8bb6cb9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13594&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13594&range=00-01
Stats: 15 lines in 1 file changed: 1 ins; 0 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/13594.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13594/head:pull/13594
PR: https://git.openjdk.org/jdk/pull/13594
More information about the serviceability-dev
mailing list