On Thu, 7 Aug 2025 22:09:20 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> The faulty implementation using waitFor is removed.

I agree this makes more sense: in `close()` the process and the three I/O 
streams are being shutdown immediately (i.e., ungracefully if necessary). This 
kind of "abrupt close" is the appropriate last ditch action when trying to wrap 
up a try-with-resources block.

On the other hand, if the caller wants a more graceful shutdown of the process 
and/or the I/O streams (even if they are also using try-with-resources) then 
they can do that manually themselves, using `waitFor()` or whatever.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26649#discussion_r2261744520

Reply via email to