chiark / gitweb /
cgroup: do not allow manipulating the cgroup path of units within the systemd:/system...
[elogind.git] / src / shared / cgroup-util.h
index a2ee72d67ffa48201e56b2c7ce6bb0db625f720a..7bd02c10089f4e7784af203fa8c9c8f48b25f729 100644 (file)
 #include "set.h"
 #include "def.h"
 
+/*
+ * General rules:
+ *
+ * We accept named hierarchies in the syntax "foo" and "name=foo".
+ *
+ * We expect that named hierarchies do not conflict in name with a
+ * kernel hierarchy, modulo the "name=" prefix.
+ *
+ * We always generate "normalized" controller names, i.e. without the
+ * "name=" prefix.
+ *
+ * We require absolute cgroup paths. When returning, we will always
+ * generate paths with multiple adjacent / removed.
+ */
+
 int cg_enumerate_processes(const char *controller, const char *path, FILE **_f);
 int cg_enumerate_tasks(const char *controller, const char *path, FILE **_f);
 int cg_read_pid(FILE *f, pid_t *_pid);