diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-08-27 17:12:13 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-08-27 17:12:13 +0000 |
commit | 5f247199e897e2d79d1a31bfb53e2fdc943a4bde (patch) | |
tree | 1201fdfbb2db6962ee63b11c561ba1157d1f9fac /src/supervision/s6-svc.c | |
parent | 62b08ed24bd50737ce090f9ab37acb832845ef4f (diff) | |
download | s6-5f247199e897e2d79d1a31bfb53e2fdc943a4bde.tar.xz |
- New -wr | -wR options to s6-svc, s6-svlisten1 and s6-svlisten
- skalibs and execline dep bump
- rc for 2.2.1.0 unless more new functionality is needed for s6-rc
Diffstat (limited to 'src/supervision/s6-svc.c')
-rw-r--r-- | src/supervision/s6-svc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/supervision/s6-svc.c b/src/supervision/s6-svc.c index 308075d..467c174 100644 --- a/src/supervision/s6-svc.c +++ b/src/supervision/s6-svc.c @@ -10,7 +10,7 @@ #include <s6/config.h> #include <s6/s6-supervise.h> -#define USAGE "s6-svc [ -wu | -wU | -wd | -wD ] [ -T timeout ] [ -abqhkti12pcoduxOX ] servicedir" +#define USAGE "s6-svc [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -T timeout ] [ -abqhkti12pcoduxOX ] servicedir" #define dieusage() strerr_dieusage(100, USAGE) #define DATASIZE 63 @@ -55,7 +55,7 @@ int main (int argc, char const *const *argv, char const *const *envp) case 'T' : if (!uint0_scan(l.arg, &timeout)) dieusage() ; break ; case 'w' : { - if (byte_chr("dDuU", 4, l.arg[0]) >= 4) dieusage() ; + if (byte_chr("dDuUrR", 6, l.arg[0]) >= 6) dieusage() ; updown[1] = l.arg[0] ; break ; } @@ -68,7 +68,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (argc > 1) strerr_warn1x("ignoring extra arguments") ; if (datalen <= 1) return 0 ; - if (updown[1] == 'U') + if (updown[1] == 'U' || updown[1] == 'R') { unsigned int arglen = str_len(argv[0]) ; char fn[arglen + 17] ; @@ -77,8 +77,8 @@ int main (int argc, char const *const *argv, char const *const *envp) if (access(fn, F_OK) < 0) { if (errno != ENOENT) strerr_diefu2sys(111, "access ", fn) ; - updown[1] = 'u' ; - strerr_warnw2x(fn, " not present - converting -wU to -wu") ; + updown[1] = updown[1] == 'U' ? 'u' : 'r' ; + strerr_warnw2x(fn, " not present - ignoring request for readiness notification") ; } } |