]> err.no Git - systemd/commitdiff
service: set WATCHDOG_USEC environmen variable
authorMichael Olbrich <m.olbrich@pengutronix.de>
Wed, 8 Feb 2012 09:10:35 +0000 (10:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Feb 2012 16:11:06 +0000 (17:11 +0100)
src/service.c

index 1631595a288fe9cc4b8856c0f6c9dd7ff5b972d6..a190a73b483d1857d7d76408a1d0be1b2000e13d 100644 (file)
@@ -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,