Summary
Add API 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 hangs unintentionally.
Solution
Add an API note to clearly specify the expected behavior
Specification
Add the following to the JavaDoc of ProcessBuilder::inheritIO()
* @apiNote
* 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
-