summaryrefslogtreecommitdiff
path: root/src/supervision/s6-svdt-clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/supervision/s6-svdt-clear.c')
-rw-r--r--src/supervision/s6-svdt-clear.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/supervision/s6-svdt-clear.c b/src/supervision/s6-svdt-clear.c
new file mode 100644
index 0000000..4db4858
--- /dev/null
+++ b/src/supervision/s6-svdt-clear.c
@@ -0,0 +1,15 @@
+/* ISC license. */
+
+#include <skalibs/strerr2.h>
+#include <s6/s6-supervise.h>
+
+#define USAGE "s6-svdt-clear servicedir"
+#define dieusage() strerr_dieusage(100, USAGE)
+
+int main (int argc, char const *const *argv)
+{
+ if (argc < 1) dieusage() ;
+ if (!s6_dtally_write(argv[1], 0, 0))
+ strerr_diefu2sys(111, "clear death tally for service ", argv[1]) ;
+ return 0 ;
+}