From: Michael Olbrich Date: Wed, 8 Feb 2012 09:10:35 +0000 (+0100) Subject: service: set WATCHDOG_USEC environmen variable X-Git-Tag: v41~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e0bcc980b1ff2fd8064d09dabf3746e7823b194;p=systemd service: set WATCHDOG_USEC environmen variable --- diff --git a/src/service.c b/src/service.c index 1631595a..a190a73b 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,