changeset 3497:178ce5786775

8151141: Sjavac fails to fork server on Windows Summary: Reverted changeset 3269:20c4b78bf457. Reviewed-by: jlahoda
author alundblad
date Thu, 03 Mar 2016 15:53:51 +0100
parents d061b06552eb
children 8000338dd45a
files src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java 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/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Thu Mar 03 15:07:29 2016 +0530
+++ b/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/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/PortFile.java	Thu Mar 03 15:07:29 2016 +0530
+++ b/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 " +