Summary
Add implementation note about the behavior of a child process built with ProcessBuilder::inheritIO() when the parent process's System.out and/or System.err have been closed.
Problem
The behavior was not clearly specified, and on Windows the child process would hang unintentionally before JDK-8366736.
Solution
Add an implementation note to clarify the expected behavior with OpenJDK.
Specification
Add the following to the JavaDoc of ProcessBuilder::inheritIO()
* @implNote
* When the process is {@link #start started},
* if {#code System.out} and/or {#code System.err} have been
* closed in the current process, the corresponding output
* in the subprocess will be discarded.
- csr of
-
JDK-8366736 Closed System.out causes child process to hang on Windows
-
- Open
-