summaryrefslogtreecommitdiff
path: root/src/pipe-tools/s6-ftrig-notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pipe-tools/s6-ftrig-notify.c')
-rw-r--r--src/pipe-tools/s6-ftrig-notify.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pipe-tools/s6-ftrig-notify.c b/src/pipe-tools/s6-ftrig-notify.c
new file mode 100644
index 0000000..1216a6a
--- /dev/null
+++ b/src/pipe-tools/s6-ftrig-notify.c
@@ -0,0 +1,20 @@
+/* ISC license. */
+
+#include <skalibs/strerr2.h>
+#include <s6/ftrigw.h>
+
+#define USAGE "s6-ftrig-notify fifodir message"
+
+int main (int argc, char const *const *argv)
+{
+ char const *p ;
+ PROG = "s6-ftrig-notify" ;
+ if (argc < 3) strerr_dieusage(100, USAGE) ;
+ p = argv[2] ;
+ for (; *p ; p++)
+ {
+ if (ftrigw_notify(argv[1], *p) == -1)
+ strerr_diefu2sys(111, "notify ", argv[1]) ;
+ }
+ return 0 ;
+}