changeset 10872:954e305333f6

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 27c3345d6dce
children 4162bcc663dc 529f33e7f04d
files test/lib/testlibrary/jdk/testlibrary/ProcessTools.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Wed Oct 22 14:42:14 2014 -0700
+++ b/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));
             }