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

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

Treat it dead if the process record's pid is invalid

Bug: 146430891
Test: Manual
Change-Id: I98bf86d2a0ee2be2ecdd613e547dbdb0fd621e95
parent 56eb64fa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2101,6 +2101,10 @@ public final class ProcessList {
     */
    @GuardedBy("mService")
    private boolean isProcessAliveLiteLocked(ProcessRecord app) {
        // If somehow the pid is invalid, let's think it's dead.
        if (app.pid <= 0) {
            return false;
        }
        try {
            Os.kill(app.pid, 0);
        } catch (ErrnoException e) {