This commit is contained in:
Coleen Phillimore 2015-10-26 18:27:33 +01:00
commit 4995b2efde
2 changed files with 9 additions and 0 deletions

View File

@ -4061,6 +4061,10 @@ static jint JNI_CreateJavaVM_inner(JavaVM **vm, void **penv, void *args) {
OrderAccess::release_store(&vm_created, 0);
}
// Flush stdout and stderr before exit.
fflush(stdout);
fflush(stderr);
return result;
}

View File

@ -575,6 +575,11 @@ void vm_shutdown()
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();
}