From 83853a80eb18238796154164f9ea776b0c167ab7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 16 Jan 2015 01:36:48 +0000 Subject: - s6-svlisten and s6-svlisten1 - Synchronous s6-svc - version 2.0.2.0, rc --- src/supervision/s6-svwait.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/supervision/s6-svwait.c') diff --git a/src/supervision/s6-svwait.c b/src/supervision/s6-svwait.c index a6dc410..9e8520b 100644 --- a/src/supervision/s6-svwait.c +++ b/src/supervision/s6-svwait.c @@ -13,7 +13,7 @@ #include #include -#define USAGE "s6-svwait [ -U | -u | -d ] [ -A | -a | -o ] [ -t timeout ] servicedir..." +#define USAGE "s6-svwait [ -U | -u | -d ] [ -a | -o ] [ -t timeout ] servicedir..." #define dieusage() strerr_dieusage(100, USAGE) static inline int check (unsigned char const *ba, unsigned int n, int wantup, int or) @@ -25,7 +25,6 @@ int main (int argc, char const *const *argv) { tain_t deadline, tto ; ftrigr_t a = FTRIGR_ZERO ; - uint32 options = FTRIGR_REPEAT ; int or = 0 ; int wantup = 1 ; char re[4] = "u|d" ; @@ -35,16 +34,15 @@ int main (int argc, char const *const *argv) unsigned int t = 0 ; for (;;) { - register int opt = subgetopt_r(argc, argv, "uUdAaot:", &l) ; + register int opt = subgetopt_r(argc, argv, "uUdaot:", &l) ; if (opt == -1) break ; switch (opt) { case 'U' : wantup = 1 ; re[0] = 'U' ; break ; case 'u' : wantup = 1 ; re[0] = 'u' ; break ; case 'd' : wantup = 0 ; break ; - case 'A' : or = 0 ; options |= FTRIGR_REPEAT ; break ; - case 'a' : or = 0 ; options &= ~FTRIGR_REPEAT ; break ; - case 'o' : or = 1 ; options &= ~FTRIGR_REPEAT ; break ; + case 'a' : or = 0 ; break ; + case 'o' : or = 1 ; break ; case 't' : if (!uint0_scan(l.arg, &t)) dieusage() ; break ; default : dieusage() ; } @@ -72,8 +70,8 @@ int main (int argc, char const *const *argv) byte_copy(s, len, argv[i]) ; s[len] = '/' ; byte_copy(s + len + 1, sizeof(S6_SUPERVISE_EVENTDIR), S6_SUPERVISE_EVENTDIR) ; - list[i] = ftrigr_subscribe_g(&a, s, re, options, &deadline) ; - if (!list[i]) strerr_diefu2sys(111, "ftrigr_subscribe to ", argv[i]) ; + list[i] = ftrigr_subscribe_g(&a, s, re, FTRIGR_REPEAT, &deadline) ; + if (!list[i]) strerr_diefu2sys(111, "subscribe to events for", argv[i]) ; } for (i = 0 ; i < (unsigned int)argc ; i++) -- cgit v1.2.3