summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index 495c8e6ba3..b59339b178 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -2937,7 +2937,7 @@ void manager_run_generators(Manager *m) {
const char *p;
char user_path[] = "/tmp/systemd-generator-XXXXXX";
- if (m->running_as == MANAGER_SYSTEM) {
+ if (m->running_as == MANAGER_SYSTEM && getpid() == 1) {
p = "/run/systemd/generator";
if (mkdir_p(p, 0755) < 0) {