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 5143ac6656..d8eeb54dbf 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -422,7 +422,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");