cgroup-util: debug log if /proc/self/ns/cgroup is not available for unexpected reasons
This commit is contained in:
parent
0d76d772d1
commit
0887fa711c
|
@ -129,10 +129,12 @@ bool cg_ns_supported(void) {
|
||||||
if (enabled >= 0)
|
if (enabled >= 0)
|
||||||
return enabled;
|
return enabled;
|
||||||
|
|
||||||
if (access("/proc/self/ns/cgroup", F_OK) == 0)
|
if (access("/proc/self/ns/cgroup", F_OK) < 0) {
|
||||||
enabled = 1;
|
if (errno != ENOENT)
|
||||||
else
|
log_debug_errno(errno, "Failed to check whether /proc/self/ns/cgroup is available, assuming not: %m");
|
||||||
enabled = 0;
|
enabled = false;
|
||||||
|
} else
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue