projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d76d77
)
cgroup-util: debug log if /proc/self/ns/cgroup is not available for unexpected reasons
author
Lennart Poettering
<lennart@poettering.net>
Wed, 24 Oct 2018 15:25:11 +0000
(17:25 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 26 Oct 2018 16:43:34 +0000
(18:43 +0200)
src/basic/cgroup-util.c
patch
|
blob
|
history
diff --git
a/src/basic/cgroup-util.c
b/src/basic/cgroup-util.c
index 19723d30843cd457ac4e6ebf388e2cb07c9ca762..65ca6f2f504b81a471bf3ef43ea179a968a52192 100644
(file)
--- a/
src/basic/cgroup-util.c
+++ b/
src/basic/cgroup-util.c
@@
-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;
}