JAL-3560 from JAL-3563. This commit is expected to be reverted. Just
[jalview.git] / test / jalview / bin / CommandLineOperations.java
index 564e57d..4ffc022 100644 (file)
@@ -203,11 +203,21 @@ public class CommandLineOperations
     {
       System.out.println(ln);
       successfulCMDs.add(ln);
+      if (ln.equals(Jalview.TERMINATOR_LINE))
+      {
+        break;
+      }
     }
-    while ((ln = worker.getErrorReader().readLine()) != null)
+    if (worker != null && worker.exit == null)
     {
-      System.err.println(ln);
+      worker.interrupt();
+      Thread.currentThread().interrupt();
+      worker.process.destroy();
     }
+    // while ((ln = worker.getErrorReader().readLine()) != null)
+    // {
+    // System.err.println(ln);
+    // }
 
   }
 
@@ -224,6 +234,11 @@ public class CommandLineOperations
     {
       System.out.println(ln);
       successfulCMDs.add(ln);
+      if (ln.equals(Jalview.TERMINATOR_LINE))
+      {
+        break;
+      }
+
       if (++count > 5)
       {
         break;