JDK-8044321 : (process) EOF does not occur reading input from spawned cmd.exe process
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7u25
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2014-05-29
  • Updated: 2014-05-30
  • Resolved: 2014-05-30
Related Reports
Relates :  
In this specific case of reading input from a spawned cmd.exe subprocess the end-of-file for the output from the subprocess does not occur and the reader hangs.  

See the attached  reproducible program on (Java 7u25)

The application spawns an interactive copy of cmd.exe (but without any input or output)
and a second cmd.exe /? from which stdout and stderr are read.
The reads from the second cmd.exe hang after reading the output; it does not receive a -1 (eof) from read.

Not reproducible on Java 8.
Possible duplicate