summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 87eaa29378..4eb3d9e668 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1750,7 +1750,7 @@ static int service_spawn(
if (r < 0)
goto fail;
- our_env = new0(char*, 5);
+ our_env = new0(char*, 4);
if (!our_env) {
r = -ENOMEM;
goto fail;
@@ -1768,12 +1768,6 @@ static int service_spawn(
goto fail;
}
- if (s->watchdog_usec > 0)
- if (asprintf(our_env + n_env++, "WATCHDOG_USEC=%llu", (unsigned long long) s->watchdog_usec) < 0) {
- r = -ENOMEM;
- goto fail;
- }
-
if (UNIT(s)->manager->running_as != SYSTEMD_SYSTEM)
if (asprintf(our_env + n_env++, "MANAGERPID=%lu", (unsigned long) getpid()) < 0) {
r = -ENOMEM;
@@ -1804,6 +1798,7 @@ static int service_spawn(
UNIT(s)->manager->cgroup_supported,
path,
UNIT(s)->id,
+ s->watchdog_usec,
s->type == SERVICE_IDLE ? UNIT(s)->manager->idle_pipe : NULL,
s->exec_runtime,
&pid);