There are some errors in jspawnhelper:
The version error introduced withJDK-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.
The version error introduced with
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 (
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.
- relates to
-
JDK-8325621 Improve jspawnhelper version checks
-
- Resolved
-