changeset 36274:28fabde8c8ed

8151141: Sjavac fails to fork server on Windows Summary: Reverted changeset 3269:80c06d9873bd. Reviewed-by: jlahoda
author alundblad
date Thu, 03 Mar 2016 15:53:51 +0100
parents a19af5725d76
children 7d18ec07fde4
files 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
diffstat 2 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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 " +