platform_system_core/libprocessgroup
Inseob Kim a049a9928b Kill services even when cgroups is disabled
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
2022-12-12 01:19:26 +00:00
..
cgrouprc Annotate symbols correctly 2022-09-26 22:14:43 +09:00
cgrouprc_format [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
include/processgroup init: skip cgroup/task_profiles configuration if cgroups are disabled 2022-10-21 13:14:23 +01:00
profiles libprocessgroup: Add I/O scheduler attributes to task_profiles.json 2022-08-25 14:01:01 -07:00
setup libprocessgroup: Fix a log message 2022-08-08 11:07:02 -07:00
tools libprocessgroup/tools: Add settaskprofile command-line tool 2021-11-09 22:35:51 +00:00
Android.bp libprocessgroup: Switch from gnu++-17 to gnu++-20 2022-08-18 12:34:21 -07:00
cgroup_map.cpp Micro-optimize CgroupMap::ActivateControllers() 2022-02-15 00:09:34 +00:00
cgroup_map.h libprocessgroup: Add CgroupGetControllerFromPath API function 2021-11-08 21:24:33 +00:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
processgroup.cpp Kill services even when cgroups is disabled 2022-12-12 01:19:26 +00:00
sched_policy.cpp libprocessgroup: fall back to cpuset in get_sched_policy 2021-12-14 10:56:34 -08:00
task_profiles.cpp libprocessgroup: Improve error messages 2022-10-12 13:48:52 -07:00
task_profiles.h libprocessgroup: Provide SetProcessProfiles() and SetTaskProfiles() alternatives 2022-08-19 07:06:30 -07:00
task_profiles_test.cpp Add support for optional cgroup attributes 2022-03-16 19:55:46 +00:00