Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8242eab2 authored by Hans Boehm's avatar Hans Boehm
Browse files

Don't call exit() with threads running

Otherwise running threads race with destructors.

Bug: 150176543
Test: Build and boot AOSP
Change-Id: I159164a36d9808ae86c2928271b14736178e127b
(cherry picked from commit 0fcf4a60)
parent 3dd11b79
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1244,12 +1244,11 @@ void AndroidRuntime::exit(int code)
{
    if (mExitWithoutCleanup) {
        ALOGI("VM exiting with result code %d, cleanup skipped.", code);
        ::_exit(code);
    } else {
        ALOGI("VM exiting with result code %d.", code);
        onExit(code);
        ::exit(code);
    }
    ::_exit(code);
}

void AndroidRuntime::onVmCreated(JNIEnv* env)