lmkd: use libprocessgroup to kill forked processes
After sending sigkill to the main process, also call into
libprocessgroup to kill any processes that were forked.
Bug: 15313911
Change-Id: I05577c6f5b70800ce0a01f480c8870c2c601afda
diff --git a/lmkd.c b/lmkd.c
index 369b5ad..1aeb182 100644
--- a/lmkd.c
+++ b/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 @@
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) {