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

am: 963de55342

Change-Id: Ic1a03c113d4615d793dae7b4273deb37a956fd5c
This commit is contained in:
Elliott Hughes 2016-08-02 23:12:09 +00:00 committed by android-build-merger
commit cb647e9318

View file

@ -197,11 +197,15 @@ void Service::NotifyStateChange(const std::string& new_state) const {
}
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) {