projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cgroups: restrict allowed keys in 'unified' section
[project/procd.git]
/
container.h
diff --git
a/container.h
b/container.h
index dd2e432adbfc586fd824846d63485b42248fe8a9..903e3e809627170b852c1f9fe541df3087005018 100644
(file)
--- a/
container.h
+++ b/
container.h
@@
-20,7
+20,8
@@
static inline bool is_container() {
struct stat s;
- return !!getenv("container") || !!stat("/.dockerenv", &s);
+ int r = stat("/.dockerenv", &s);
+ return !!getenv("container") || r == 0;
}
#endif