Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
int pakfire_cgroup_create(Pakfire pakfire, const char* group) {
int supported = pakfire_cgroup_supported(pakfire);
- if (!supported)
+ if (!supported) {
+ errno = ENOTSUP;
return 1;
+ }
// Ensure that parent groups exist
char* parent = pakfire_cgroup_parent_name(group);
// Create cgroup
r = pakfire_cgroup_create(pakfire, env.cgroup);
- if (r)
+ if (r) {
+ ERROR(pakfire, "Could not create cgroup %s: %s\n", env.cgroup, strerror(errno));
goto ERROR;
+ }
// Launch the new process straight into their cgroup
cgroupdir = pakfire_cgroup_opendir(pakfire, env.cgroup);