}
for (pid_t pid : runtime::FileUser::getList(INTERNAL_PATH, true)) {
+ auto pgid = ::getpgid(pid);
+ if (pgid > 0 && pid != pgid) {
+ WARN(SINK, "PGID doesn't match - pgid : " + std::to_string(pgid) + ", pid : " + std::to_string(pid));
+ continue;
+ }
+
try {
char *unit = nullptr;
systemDBus.methodcall("org.freedesktop.systemd1",
std::string unescapedName(tmp);
free(tmp);
- if (unescapedName.find("dbus", 0, 4) == std::string::npos)
- unitsToStop.insert(unescapedName);
+ unitsToStop.insert(unescapedName);
} catch (runtime::Exception &e) {
ERROR(SINK, "Killing process: " + std::to_string(pid));
::kill(pid, SIGKILL);