summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-04 22:11:29 +0200
committerLennart Poettering <lennart@poettering.net>2016-08-04 23:08:05 +0200
commitb08af3b12706f352f651e70e117f6d6dcf11a911 (patch)
treee2b25e8fa84d64231a1d450e13065537c25986f3 /src/core/execute.c
parenta0fef983ab200db4e2b151beb06c9cf8fef6c5ab (diff)
core: only set the watchdog variables in ExecStart= lines
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 9028139723..7aafb1b058 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1425,7 +1425,7 @@ static int build_environment(
our_env[n_env++] = x;
}
- if (p->watchdog_usec > 0) {
+ if ((p->flags & EXEC_SET_WATCHDOG) && p->watchdog_usec > 0) {
if (asprintf(&x, "WATCHDOG_PID="PID_FMT, getpid()) < 0)
return -ENOMEM;
our_env[n_env++] = x;