a049a9928b
process_cgroup_empty_ is used to indicate that a service is already killed or not. If cgroup support lacks, services cannot be killed because process_cgroup_empty_ is always true. This change fixes it by not assigning process_cgroup_empty_ as true. Instead, make KillProcessGroup send signals even when cgroup is disabled. Also DoKillProcessGroupOnce() is updated so it returns a number of killed processes, excluding already dead processes. This behavior agrees with its name (DoKillProcessOnce), and it prevents regression upon missing cgroups, because kill(-pgid) will always "succeed" so KillProcessGroup will loop even when all processes are already dead. Bug: 257264124 Test: boot microdroid, see services are terminated Change-Id: I19abf19ff1b70c666cd6f12d0a12956765174aaa |
||
---|---|---|
.. | ||
cgrouprc | ||
cgrouprc_format | ||
include/processgroup | ||
profiles | ||
setup | ||
tools | ||
Android.bp | ||
cgroup_map.cpp | ||
cgroup_map.h | ||
OWNERS | ||
processgroup.cpp | ||
sched_policy.cpp | ||
task_profiles.cpp | ||
task_profiles.h | ||
task_profiles_test.cpp |