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

Commit b22de4e6 authored by Jing Ji's avatar Jing Ji
Browse files

Fix race conditions in removing dying process record

While waiting for the death of a process, if its subsequent process
record is created and killed immediately, we may end up removing
the former process record from the dying process list.

Bug: 201305599
Test: Presubmit
Change-Id: Ib62a3644d927881d7dab577b625460239e54b434
parent eb7f4c07
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5143,7 +5143,8 @@ public final class ProcessList {
        }

        Watchdog.getInstance().processDied(app.processName, app.getPid());
        if (app.getDeathRecipient() == null) {
        if (app.getDeathRecipient() == null
                && mDyingProcesses.get(app.processName, app.uid) == app) {
            // If we've done unlinkDeathRecipient before calling into this, remove from dying list.
            mDyingProcesses.remove(app.processName, app.uid);
            app.setDyingPid(0);