8151141: Sjavac fails to fork server on Windows
authoralundblad
Thu, 03 Mar 2016 15:53:51 +0100
changeset 36274 28fabde8c8ed
parent 36273 a19af5725d76
child 36275 7d18ec07fde4
8151141: Sjavac fails to fork server on Windows Summary: Reverted changeset 3269:80c06d9873bd. Reviewed-by: jlahoda
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/PortFile.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Thu Mar 03 15:07:29 2016 +0530
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Thu Mar 03 15:53:51 2016 +0100
@@ -257,7 +257,7 @@
         // serverProcess != null at this point.
         try {
             // Throws an IOException if no valid values materialize
-            portFile.waitForValidValues(serverProcess);
+            portFile.waitForValidValues();
         } catch (IOException ex) {
             // Process was started, but server failed to initialize. This could
             // for instance be due to the JVM not finding the server class,
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/PortFile.java	Thu Mar 03 15:07:29 2016 +0530
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/PortFile.java	Thu Mar 03 15:53:51 2016 +0100
@@ -232,7 +232,7 @@
     /**
      * Wait for the port file to contain values that look valid.
      */
-    public void waitForValidValues(Process serverProcess) throws IOException, InterruptedException {
+    public void waitForValidValues() throws IOException, InterruptedException {
         final int MS_BETWEEN_ATTEMPTS = 500;
         long startTime = System.currentTimeMillis();
         long timeout = startTime + getServerStartupTimeoutSeconds() * 1000;
@@ -250,9 +250,6 @@
             if (System.currentTimeMillis() > timeout) {
                 break;
             }
-            if (!serverProcess.isAlive()) {
-                throw new IOException("Server process terminated.");
-            }
             Thread.sleep(MS_BETWEEN_ATTEMPTS);
         }
         throw new IOException("No port file values materialized. Giving up after " +