changeset 27258:e66ef2eba095

8062070: com/sun/jdi/DoubleAgentTest.java.DoubleAgentTest fails intermittently after 8056143 Reviewed-by: dholmes
author jbachorik
date Fri, 24 Oct 2014 18:33:42 +0200
parents b409bc51bc23
children 8dc38c3bad7e 8299f6b0c5fc
files jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Wed Jul 05 20:05:30 2017 +0200
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Fri Oct 24 18:33:42 2014 +0200
@@ -319,13 +319,14 @@
 
             return output;
         } catch (Throwable t) {
+            if (p != null) {
+                p.destroyForcibly().waitFor();
+            }
+
             failed = true;
             System.out.println("executeProcess() failed: " + t);
             throw t;
         } finally {
-            if (p != null) {
-                p.destroyForcibly().waitFor();
-            }
             if (failed) {
                 System.err.println(getProcessLog(pb, output));
             }