[systemd-devel] [PATCH 2/3] set WATCHDOG_USEC environmen variable

Michael Olbrich m.olbrich at pengutronix.de
Fri Feb 3 12:14:24 PST 2012


---
 src/service.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/service.c b/src/service.c
index f030ccf..9bd3332 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1726,6 +1726,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,
-- 
1.7.8.3



More information about the systemd-devel mailing list