Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a5300fc authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Have init kill the process group."

parents 11708e02 1e730246
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -197,11 +197,15 @@ void Service::NotifyStateChange(const std::string& new_state) const {
}

void Service::KillProcessGroup(int signal) {
    LOG(VERBOSE) << "Sending signal " << signal
    LOG(INFO) << "Sending signal " << signal
              << " to service '" << name_
                 << "' (pid " << pid_ << ") process group...\n",
    kill(pid_, signal);
    killProcessGroup(uid_, pid_, signal);
              << "' (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) {