Merge "Have init kill the process group."
am: 9a5300fcb8
Change-Id: I692c5fabfaea39e7ed6c9de5f6ad245330e3442c
This commit is contained in:
commit
963de55342
1 changed files with 9 additions and 5 deletions
|
|
@ -197,11 +197,15 @@ void Service::NotifyStateChange(const std::string& new_state) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Service::KillProcessGroup(int signal) {
|
void Service::KillProcessGroup(int signal) {
|
||||||
LOG(VERBOSE) << "Sending signal " << signal
|
LOG(INFO) << "Sending signal " << signal
|
||||||
<< " to service '" << name_
|
<< " to service '" << name_
|
||||||
<< "' (pid " << pid_ << ") process group...\n",
|
<< "' (pid " << pid_ << ") process group...";
|
||||||
kill(pid_, signal);
|
if (killProcessGroup(uid_, pid_, signal) == -1) {
|
||||||
killProcessGroup(uid_, pid_, signal);
|
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) {
|
void Service::CreateSockets(const std::string& context) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue