chiark / gitweb /
core: add new .slice unit type for partitioning systems
[elogind.git] / src / core / cgroup.c
index 83df0f3c9a940130a93a6ae0181b4ac6fc0be8fd..a995d1436dab4830a6d3040ba71203c5a73fa5f6 100644 (file)
@@ -340,14 +340,14 @@ int manager_setup_cgroup(Manager *m) {
         }
 
         if (m->running_as == SYSTEMD_SYSTEM)
-                suffix = "/system";
+                suffix = NULL;
         else {
                 sprintf(suffix_buffer, "/systemd-%lu", (unsigned long) getpid());
                 suffix = suffix_buffer;
         }
 
         free(m->cgroup_hierarchy);
-        if (endswith(current, suffix)) {
+        if (!suffix || endswith(current, suffix)) {
                 /* We probably got reexecuted and can continue to use our root cgroup */
                 m->cgroup_hierarchy = current;
                 current = NULL;