No description
Add a function which sends signals to all members of a process group,
but does not wait for the processes to exit, or for the associated
cgroup to be removed.
Bug: 274646058
Ignore-AOSP-First: Dependency of ActivityManager change which developed on interal git_master
Test: Force-stop of chrome with 15 tabs completes ~500ms faster
Test: Full Play store update causes no ANR
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d87b6018d25cbbd33b345dc58c634718bf5d0def)
Merged-In: I37dbdecb3394101abbee8495e71f6912b3c031f5
Change-Id: I37dbdecb3394101abbee8495e71f6912b3c031f5
NOTE FOR REVIEWERS - original patch and result patch are not identical.
PLEASE REVIEW CAREFULLY.
Diffs between the patches:
37,6 +537,15 @@
return KillProcessGroup(uid, initialPid, signal, 0 /*retries*/, max_processes);
}
+int sendSignalToProcessGroup(uid_t uid, int initialPid, int signal) {
+ std::string hierarchy_root_path;
+ if (CgroupsAvailable()) {
+ CgroupGetControllerPath(CGROUPV2_CONTROLLER_NAME, &hierarchy_root_path);
+ }
+ const char* cgroup = hierarchy_root_path.c_str();
+ return DoKillProcessGroupOnce(cgroup, uid, initialPid, signal);
+}
+
static int createProcessGroupInternal(uid_t uid, int initialPid, std::string cgroup,
bool activate_controllers) {
auto uid_path = ConvertUidToPath(cgroup.c_str(), uid);
Original patch:
From
|
||
|---|---|---|
| bootstat | ||
| cli-test | ||
| code_coverage | ||
| debuggerd | ||
| diagnose_usb | ||
| fastboot | ||
| fs_mgr | ||
| gatekeeperd | ||
| healthd | ||
| include | ||
| init | ||
| janitors | ||
| libappfuse | ||
| libasyncio | ||
| libbinderwrapper | ||
| libcrypto_utils | ||
| libcutils | ||
| libdiskconfig | ||
| libgrallocusage | ||
| libkeyutils | ||
| libmodprobe | ||
| libnetutils | ||
| libpackagelistparser | ||
| libprocessgroup | ||
| libsparse | ||
| libstats | ||
| libsuspend | ||
| libsync | ||
| libsystem | ||
| libsysutils | ||
| libusbhost | ||
| libutils | ||
| libvndksupport | ||
| llkd | ||
| mini_keyctl | ||
| mkbootfs | ||
| property_service | ||
| reboot | ||
| rootdir | ||
| run-as | ||
| sdcard | ||
| shell_and_utilities | ||
| storaged | ||
| toolbox | ||
| trusty | ||
| usbd | ||
| watchdogd | ||
| .clang-format | ||
| .clang-format-2 | ||
| .clang-format-4 | ||
| .gitignore | ||
| CleanSpec.mk | ||
| METADATA | ||
| MODULE_LICENSE_APACHE2 | ||
| OWNERS | ||
| PREUPLOAD.cfg | ||
| rustfmt.toml | ||