On Fri, 30 Aug 2024 20:18:15 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> test/jdk/com/sun/jdi/ReattachStressTest.java line 76: >> >>> 74: // Read the first character of output to make sure we've >>> waited until the >>> 75: // debuggee is ready. This will be the debug agent's >>> "Listening..." message. >>> 76: InputStream is = p.getInputStream(); >> >> The stream is not closed. Not sure it can cause problems but probably could >> once we reuse agent for tests. > > The `InputStream` is already created when the `Process` is spawned. This API > is simply returning it. It doesn't seem appropriate to close it in this case. > It should be closed automatically when the Process is destroyed. I also see a > lot of other uses of `p.getInputStream()` that don't explicitly close, > including some which are obviously not closed: > > ` p.getInputStream().read();` Thanks for explanation, sorry for noise. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20755#discussion_r1739415245