Merge "Have init kill the process group."
am: 9a5300fcb8

Change-Id: I692c5fabfaea39e7ed6c9de5f6ad245330e3442c
diff --git a/init/service.cpp b/init/service.cpp
index 44d9d8c..32aafd6 100644
--- a/init/service.cpp
+++ b/init/service.cpp
@@ -197,11 +197,15 @@
 }
 
 void Service::KillProcessGroup(int signal) {
-    LOG(VERBOSE) << "Sending signal " << signal
-                 << " to service '" << name_
-                 << "' (pid " << pid_ << ") process group...\n",
-    kill(pid_, signal);
-    killProcessGroup(uid_, pid_, signal);
+    LOG(INFO) << "Sending signal " << signal
+              << " to service '" << name_
+              << "' (pid " << pid_ << ") process group...";
+    if (killProcessGroup(uid_, pid_, signal) == -1) {
+        PLOG(ERROR) << "killProcessGroup(" << uid_ << ", " << pid_ << ", " << signal << ") failed";
+    }
+    if (kill(-pid_, signal) == -1) {
+        PLOG(ERROR) << "kill(" << pid_ << ", " << signal << ") failed";
+    }
 }
 
 void Service::CreateSockets(const std::string& context) {