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

(process) jspawnhelper version check is too early

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 26
    • core-libs
    • None

      There are some errors in jspawnhelper:

      The version error introduced with JDK-8325621 has two problems:
      a) It does not send an error code back to the parent. This is hidden now as a side effect of the liveness ping mechanism, but we want to remove that mechanism (JDK-8362257). Once the mechanism is removed the parent would not know that jspawnhelper failed with a version check, would therefore return a Process, and for the user it would look like their program ended right away with returning -1.
      b) This is minor: This version check happens before we redirect stdin/out/err of child to the correct pipes (that happens later in childProcess()). This means the "wrong version" output will always apper in the stderr of jspawnhelper, so the inherited stderr of the parent JVM, even if the caller redirected stderr of this call. Customers would probably check output files for these spawns in their output and miss the output at JVM stderr of the parent JVM.

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: