summaryrefslogtreecommitdiff
path: root/src/pipe-tools/s6-ftrig-notify.c
blob: 1216a6a9c924956c0209481332b360f7f4abdaf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 ;
}