summaryrefslogtreecommitdiff
path: root/src/basic/virt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r--src/basic/virt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index a8f1652d2..36bfd2429 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -423,7 +423,7 @@ int detect_container(void) {
goto finish;
}
- if (getpid() == 1) {
+ if (getpid_cached() == 1) {
/* If we are PID 1 we can just check our own environment variable, and that's authoritative. */
e = getenv("container");