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

Commit 32d59717 authored by Martijn Coenen's avatar Martijn Coenen Committed by Automerger Merge Worker
Browse files

Merge "Use killProcessGroup when killing app zygote." into rvc-dev am: 0a8ef2b4

Original change: undetermined

Change-Id: I86c9ffb1b61703d59272cd0dec6ba6dab4b5afae
parents 281d0f04 0a8ef2b4
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -92,10 +92,9 @@ public class AppZygote {
    @GuardedBy("mLock")
    @GuardedBy("mLock")
    private void stopZygoteLocked() {
    private void stopZygoteLocked() {
        if (mZygote != null) {
        if (mZygote != null) {
            // Close the connection and kill the zygote process. This will not cause
            // child processes to be killed by itself.
            mZygote.close();
            mZygote.close();
            Process.killProcess(mZygote.getPid());
            // use killProcessGroup() here, so we kill all untracked children as well.
            Process.killProcessGroup(mZygoteUid, mZygote.getPid());
            mZygote = null;
            mZygote = null;
        }
        }
    }
    }