changeset 9607:0aa8adafb982

8139801: Error message from validation check has wrong order on Windows Summary: Added flushing stdout and stderr before exit or abort Reviewed-by: coleenp, cjplummer
author sangheki
date Mon, 26 Oct 2015 08:34:25 -0700
parents 4d7995577f52
children 2c30539cb670
files src/share/vm/prims/jni.cpp src/share/vm/runtime/java.cpp
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp	Fri Oct 23 14:33:19 2015 +0300
+++ b/src/share/vm/prims/jni.cpp	Mon Oct 26 08:34:25 2015 -0700
@@ -4061,6 +4061,10 @@
     OrderAccess::release_store(&vm_created, 0);
   }
 
+  // Flush stdout and stderr before exit.
+  fflush(stdout);
+  fflush(stderr);
+
   return result;
 
 }
--- a/src/share/vm/runtime/java.cpp	Fri Oct 23 14:33:19 2015 +0300
+++ b/src/share/vm/runtime/java.cpp	Mon Oct 26 08:34:25 2015 -0700
@@ -575,6 +575,11 @@
 void vm_abort(bool dump_core) {
   vm_perform_shutdown_actions();
   os::wait_for_keypress_at_exit();
+
+  // Flush stdout and stderr before abort.
+  fflush(stdout);
+  fflush(stderr);
+
   os::abort(dump_core);
   ShouldNotReachHere();
 }