summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-02-08 10:10:35 +0100
committerLennart Poettering <lennart@poettering.net>2012-02-08 17:11:06 +0100
commit6e0bcc980b1ff2fd8064d09dabf3746e7823b194 (patch)
tree78bf5f938e310290945404caf9520730bde11113 /src/service.c
parentbb242b7b5277f5db4a01be905f26eccd382ff1e0 (diff)
service: set WATCHDOG_USEC environmen variable
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 1631595a28..a190a73b48 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1735,6 +1735,12 @@ 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 (!(final_env = strv_env_merge(2,
UNIT(s)->manager->environment,
our_env,