Merge "Don't call exit() with threads running" into rvc-dev

This commit is contained in:
Hans Boehm
2020-04-20 23:57:21 +00:00
committed by Android (Google) Code Review

View File

@@ -1244,12 +1244,11 @@ void AndroidRuntime::exit(int code)
{ {
if (mExitWithoutCleanup) { if (mExitWithoutCleanup) {
ALOGI("VM exiting with result code %d, cleanup skipped.", code); ALOGI("VM exiting with result code %d, cleanup skipped.", code);
::_exit(code);
} else { } else {
ALOGI("VM exiting with result code %d.", code); ALOGI("VM exiting with result code %d.", code);
onExit(code); onExit(code);
::exit(code);
} }
::_exit(code);
} }
void AndroidRuntime::onVmCreated(JNIEnv* env) void AndroidRuntime::onVmCreated(JNIEnv* env)