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

Commit 950f6f36 authored by fengshaobo's avatar fengshaobo
Browse files

Fixed the can not kill some process using libprocessgroup

In DoKillProcessGroupOnce function, if process has a child process, pids set
will be clear probability and initialPid will not be killed, when the pid
is equal to initialPid.

Test: manual - start duomi app and remove it use recent apps key
Change-Id: Ifb9f4acacd725d2c367e547d2b5512807bb44fec
parent 4cd979fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static int DoKillProcessGroupOnce(uid_t uid, int initialPid, int signal) {

    // Erase all pids that will be killed when we kill the process groups.
    for (auto it = pids.begin(); it != pids.end();) {
        pid_t pgid = getpgid(pid);
        pid_t pgid = getpgid(*it);
        if (pgids.count(pgid) == 1) {
            it = pids.erase(it);
        } else {