am 420f0a25: Merge "lmkd: use libprocessgroup to kill forked processes"
* commit '420f0a2567e8697b828e59802f972382360e667d': lmkd: use libprocessgroup to kill forked processes
This commit is contained in:
commit
8cb357ea50
2 changed files with 3 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := lmkd.c
|
LOCAL_SRC_FILES := lmkd.c
|
||||||
LOCAL_SHARED_LIBRARIES := libcutils liblog libm libc
|
LOCAL_SHARED_LIBRARIES := libcutils liblog libm libc libprocessgroup
|
||||||
LOCAL_CFLAGS := -Werror
|
LOCAL_CFLAGS := -Werror
|
||||||
|
|
||||||
LOCAL_MODULE := lmkd
|
LOCAL_MODULE := lmkd
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include <cutils/sockets.h>
|
#include <cutils/sockets.h>
|
||||||
#include <log/log.h>
|
#include <log/log.h>
|
||||||
|
#include <processgroup/processgroup.h>
|
||||||
|
|
||||||
#ifndef __unused
|
#ifndef __unused
|
||||||
#define __unused __attribute__((__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_file * page_k, minfree * page_k, min_score_adj,
|
||||||
other_free * page_k, other_free >= 0 ? "above" : "below");
|
other_free * page_k, other_free >= 0 ? "above" : "below");
|
||||||
r = kill(pid, SIGKILL);
|
r = kill(pid, SIGKILL);
|
||||||
|
killProcessGroup(uid, pid, SIGKILL);
|
||||||
pid_remove(pid);
|
pid_remove(pid);
|
||||||
|
|
||||||
if (r) {
|
if (r) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue