]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #33911 from YHNdnzj/cgroup-setup-cleanup
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 2 Aug 2024 21:20:02 +0000 (06:20 +0900)
committerGitHub <noreply@github.com>
Fri, 2 Aug 2024 21:20:02 +0000 (06:20 +0900)
cgroup-setup/util: several cleanups; make use of cgroup.kill on client request

1  2 
src/basic/cgroup-util.c

index 1608326bc39f2af4cc8e879ff96a4b94339131fe,55a36c4f1b63aba886f116ffd79e57e63c74f52d..18bc0ff2aedb95f9d4eb129d44b276dc7ab50e6f
@@@ -368,10 -348,10 +348,10 @@@ static int cg_kill_items
                          if ((flags & CGROUP_IGNORE_SELF) && pidref_is_self(&pidref))
                                  continue;
  
-                         if (set_get(s, PID_TO_PTR(pidref.pid)) == PID_TO_PTR(pidref.pid))
+                         if (set_contains(s, PID_TO_PTR(pidref.pid)))
                                  continue;
  
 -                        /* Ignore kernel threads to mimick the behavior of cgroup.kill. */
 +                        /* Ignore kernel threads to mimic the behavior of cgroup.kill. */
                          if (pidref_is_kernel_thread(&pidref) > 0) {
                                  log_debug("Ignoring kernel thread with pid " PID_FMT " in cgroup '%s'", pidref.pid, path);
                                  continue;