mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
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)
|
||||
return enabled;
|
||||
|
||||
if (access("/proc/self/ns/cgroup", F_OK) == 0)
|
||||
enabled = 1;
|
||||
else
|
||||
enabled = 0;
|
||||
if (access("/proc/self/ns/cgroup", F_OK) < 0) {
|
||||
if (errno != ENOENT)
|
||||
log_debug_errno(errno, "Failed to check whether /proc/self/ns/cgroup is available, assuming not: %m");
|
||||
enabled = false;
|
||||
} else
|
||||
enabled = true;
|
||||
|
||||
return enabled;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user