diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-20 20:20:54 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-20 20:20:54 +0000 |
commit | a3cdeecf0033919e3b5a79c17c19b5ac98719256 (patch) | |
tree | 92a930930f18a4f8ae897b1a69c39358137ce1e2 /src/supervision/s6-svscanctl.c | |
parent | bd34de9054cec794d96b0fde1eee9100e1d34215 (diff) | |
download | s6-a3cdeecf0033919e3b5a79c17c19b5ac98719256.tar.xz |
- Add timeout-finish support and "down-readiness"
- LOTS of refactoring to make this work
- Remove s6-notifywhenup
- s6-supervise now rocks the casbah
- rc for 2.2.0.0
Diffstat (limited to 'src/supervision/s6-svscanctl.c')
-rw-r--r-- | src/supervision/s6-svscanctl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/supervision/s6-svscanctl.c b/src/supervision/s6-svscanctl.c index 6529e9c..a991146 100644 --- a/src/supervision/s6-svscanctl.c +++ b/src/supervision/s6-svscanctl.c @@ -52,14 +52,8 @@ int main (int argc, char const *const *argv) } if (!argc) dieusage() ; - { - unsigned int arglen = str_len(*argv) ; - char tmp[arglen + 20] ; - byte_copy(tmp, arglen, *argv) ; - byte_copy(tmp + arglen, 20, "/.s6-svscan/control") ; - r = s6_svc_write(tmp, data, datalen) ; - } - if (r < 0) strerr_diefu2sys(111, "control ", *argv) ; - else if (!r) strerr_diefu3x(100, "control ", *argv, ": supervisor not listening") ; + r = s6_svc_writectl(argv[0], S6_SVSCAN_CTLDIR, data, datalen) ; + if (r < 0) strerr_diefu2sys(111, "control ", argv[0]) ; + else if (!r) strerr_diefu3x(100, "control ", argv[0], ": supervisor not listening") ; return 0 ; } |