my_pid = getpid();
+ log_debug_elogind("Migrating \"%s\"/\"%s\" to \"%s\"/\"%s\" (%s)",
+ cfrom, pfrom, cto, pto,
+ ignore_self ? "ignoring self" : "watching self");
+
do {
_cleanup_fclose_ FILE *f = NULL;
pid_t pid = 0;
return r;
root = rt;
+ log_debug_elogind("Determined root path: \"%s\"", root);
}
p = path_startswith(cgroup, root);
- if (p && p > cgroup)
+ if (p && p[0] && (p > cgroup))
*shifted = p - 1;
else
*shifted = cgroup;
if (r < 0)
return r;
+ log_debug_elogind("Shifting path: \"%s\" (PID %u, root: \"%s\")",
+ raw, pid, root ? root : "NULL");
r = cg_shift_path(raw, root, &c);
if (r < 0)
return r;
*cgroup = n;
}
+ log_debug_elogind("Resulting cgroup:\"%s\"", *cgroup);
return 0;
}
const char *e, *n, *start;
assert(path);
+ log_debug_elogind("path is \"%s\"", path);
assert(path[0] == '/');
e = path + 1;
if (session) {
char *rr;
+ log_debug_elogind("found session: \"%s\"", start);
rr = strdup(start);
if (!rr)
return -ENOMEM;
return 0;
}
-#endif // 0
int cg_attach_everywhere(CGroupMask supported, const char *path, pid_t pid, cg_migrate_callback_t path_callback, void *userdata) {
CGroupController c;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
int cg_attach_many_everywhere(CGroupMask supported, const char *path, Set* pids, cg_migrate_callback_t path_callback, void *userdata) {
Iterator i;
void *pidp;
else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC))
#else
if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC))
-#endif // elogind
+#endif // 0
unified_cache = false;
else
return -ENOEXEC;
return 0;
}
-#endif // 0
bool cg_is_unified_wanted(void) {
static thread_local int wanted = -1;
}
}
-/// UNNEEDED by elogind
-#if 0
bool cg_is_legacy_wanted(void) {
return !cg_is_unified_wanted();
}