summaryrefslogtreecommitdiff
path: root/src/libs6/s6_dtally_pack.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-03-20 14:52:26 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-03-20 14:52:26 +0000
commit26c5fee82736e56cff3d114ff9d6e3969d1ce061 (patch)
treea43283438dc8d22b339cda86b0d80c58ef86bf4d /src/libs6/s6_dtally_pack.c
parent1747a0f5142f0c36a61b37786368f05bcb3060f3 (diff)
downloads6-26c5fee82736e56cff3d114ff9d6e3969d1ce061.tar.xz
Add death tally support to s6-supervise, throttling support to s6_svstatus_t
Diffstat (limited to 'src/libs6/s6_dtally_pack.c')
-rw-r--r--src/libs6/s6_dtally_pack.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libs6/s6_dtally_pack.c b/src/libs6/s6_dtally_pack.c
new file mode 100644
index 0000000..1608e78
--- /dev/null
+++ b/src/libs6/s6_dtally_pack.c
@@ -0,0 +1,11 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+#include <s6/s6-supervise.h>
+
+void s6_dtally_pack (char *pack, s6_dtally_t const *d)
+{
+ tain_pack(pack, &d->stamp) ;
+ pack[TAIN_PACK] = d->exitcode ;
+ pack[TAIN_PACK + 1] = d->sig ;
+}