1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

service: set WATCHDOG_USEC environmen variable

This commit is contained in:
Michael Olbrich 2012-02-08 10:10:35 +01:00 committed by Lennart Poettering
parent bb242b7b52
commit 6e0bcc980b

View 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,