Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8044321

(process) EOF does not occur reading input from spawned cmd.exe process

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7u25
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rriggs Roger Riggs
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: