diff options
| author | Colin Cross <ccross@android.com> | 2014-07-10 19:51:35 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-09 21:39:59 +0000 |
| commit | 420f0a2567e8697b828e59802f972382360e667d (patch) | |
| tree | 48832ff7d720b3544d85ed35e44351097d3d8992 | |
| parent | fb27d34dacf45fa1b5a5ea8ded778889827e5c99 (diff) | |
| parent | fef9522d9b9c0c0c5c55625a770cc58ece778da2 (diff) | |
| download | system_core-420f0a2567e8697b828e59802f972382360e667d.zip system_core-420f0a2567e8697b828e59802f972382360e667d.tar.gz system_core-420f0a2567e8697b828e59802f972382360e667d.tar.bz2 | |
Merge "lmkd: use libprocessgroup to kill forked processes"
| -rw-r--r-- | lmkd/Android.mk | 2 | ||||
| -rw-r--r-- | lmkd/lmkd.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lmkd/Android.mk b/lmkd/Android.mk index 2dd8af2..043a085 100644 --- a/lmkd/Android.mk +++ b/lmkd/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := lmkd.c -LOCAL_SHARED_LIBRARIES := libcutils liblog libm libc +LOCAL_SHARED_LIBRARIES := libcutils liblog libm libc libprocessgroup LOCAL_CFLAGS := -Werror LOCAL_MODULE := lmkd diff --git a/lmkd/lmkd.c b/lmkd/lmkd.c index 369b5ad..1aeb182 100644 --- a/lmkd/lmkd.c +++ b/lmkd/lmkd.c @@ -32,6 +32,7 @@ #include <cutils/sockets.h> #include <log/log.h> +#include <processgroup/processgroup.h> #ifndef __unused #define __unused __attribute__((__unused__)) @@ -591,6 +592,7 @@ static void mp_event(uint32_t events __unused) { other_file * page_k, minfree * page_k, min_score_adj, other_free * page_k, other_free >= 0 ? "above" : "below"); r = kill(pid, SIGKILL); + killProcessGroup(uid, pid, SIGKILL); pid_remove(pid); if (r) { |
