diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-04-12 12:41:19 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-04-12 12:41:19 +0300 |
commit | 65eefcdc601ef0f57b0779f1722161fc83a571c3 (patch) | |
tree | 7fe642e7d6e685ed87fbd292d986b871b5e0a720 /include | |
parent | 9c42b9038dc1457fd4aeed0520bc143a043a84d9 (diff) | |
parent | 36c01167200cf29ac92f3bd3263d7757c55cbb89 (diff) | |
download | mariadb-git-65eefcdc601ef0f57b0779f1722161fc83a571c3.tar.gz |
Merge remote-tracking branch '10.2' into 10.3
Diffstat (limited to 'include')
-rw-r--r-- | include/my_service_manager.h (renamed from include/my_systemd.h) | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/my_systemd.h b/include/my_service_manager.h index bef75576422..4d88e992b5e 100644 --- a/include/my_systemd.h +++ b/include/my_service_manager.h @@ -16,8 +16,8 @@ */ -#ifndef MY_SYSTEMD_INCLUDED -#define MY_SYSTEMD_INCLUDED +#ifndef MY_SERVICE_MANAGER_INCLUDED +#define MY_SERVICE_MANAGER_INCLUDED #if defined(HAVE_SYSTEMD) && !defined(EMBEDDED_LIBRARY) /* @@ -26,9 +26,14 @@ */ #define __STDC_FORMAT_MACROS #include <systemd/sd-daemon.h> +/** INTERVAL in seconds followed by printf style status */ +#define service_manager_extend_timeout(INTERVAL, FMTSTR, ...) \ + sd_notifyf(0, "STATUS=" FMTSTR "\nEXTEND_TIMEOUT_USEC=%u\n", ##__VA_ARGS__, INTERVAL * 1000000) + #else #define sd_notify(X, Y) #define sd_notifyf(E, F, ...) +#define service_manager_extend_timeout(I, FMTSTR, ...) #endif -#endif /* MY_SYSTEMD_INCLUDED */ +#endif /* MY_SERVICE_MANAGER_INCLUDED */ |