diff options
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/upgrade.html | 2 | ||||
-rw-r--r-- | src/libs6rc/s6rc_servicedir_block.c | 17 | ||||
-rw-r--r-- | src/libs6rc/s6rc_servicedir_unblock.c | 14 |
5 files changed, 5 insertions, 32 deletions
@@ -8,7 +8,7 @@ Build Instructions - GNU make version 3.81 or later - skalibs version 2.13.1.0 or later: https://skarnet.org/software/skalibs/ - execline version 2.9.1.0 or later: https://skarnet.org/software/execline/ - - s6 version 2.11.2.1 or later: https://skarnet.org/software/s6/ + - s6 version 2.11.3.0 or later: https://skarnet.org/software/s6/ This software will run on any operating system that implements POSIX.1-2008, available at: diff --git a/doc/index.html b/doc/index.html index 67e2047..582a506 100644 --- a/doc/index.html +++ b/doc/index.html @@ -53,7 +53,7 @@ requirement if you link against the shared version of the skalibs library. </li> <li> <a href="//skarnet.org/software/execline/">execline</a> version 2.9.1.0 or later. It's a build-time <em>and</em> run-time requirement. </li> <li> <a href="//skarnet.org/software/s6/">s6</a> version -2.11.2.1 or later. It's a build-time <em>and</em> run-time requirement. </li> +2.11.3.0 or later. It's a build-time <em>and</em> run-time requirement. </li> </ul> <h3> Licensing </h3> diff --git a/doc/upgrade.html b/doc/upgrade.html index 067211c..348fef0 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -36,7 +36,7 @@ minor and bugfix version changes. <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> dependency bumped to 2.13.1.0. </li> <li> <a href="//skarnet.org/software/s6/">s6</a> -dependency bumped to 2.11.2.1. </li> +dependency bumped to 2.11.3.0. </li> </ul> <h2> in 0.5.3.3 </h2> diff --git a/src/libs6rc/s6rc_servicedir_block.c b/src/libs6rc/s6rc_servicedir_block.c index bc85f07..4516148 100644 --- a/src/libs6rc/s6rc_servicedir_block.c +++ b/src/libs6rc/s6rc_servicedir_block.c @@ -1,28 +1,13 @@ /* ISC license. */ -#include <string.h> -#include <unistd.h> - -#include <skalibs/posixplz.h> -#include <skalibs/djbunix.h> - #include <s6/supervise.h> #include <s6-rc/s6rc-servicedir.h> int s6rc_servicedir_block (char const *dir) { - size_t dirlen = strlen(dir) ; s6_svstatus_t status ; - char fn[dirlen + 6] ; if (!s6_svstatus_read(dir, &status)) return -1 ; - memcpy(fn, dir, dirlen) ; - memcpy(fn + dirlen, "/down", 6) ; - if (!touch(fn)) return -1 ; - if (s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "O", 1) < 0) - { - unlink_void(fn) ; - return -1 ; - } + if (s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "Q", 1) < 0) return -1 ; return status.flagwantup ; } diff --git a/src/libs6rc/s6rc_servicedir_unblock.c b/src/libs6rc/s6rc_servicedir_unblock.c index c1ad8ab..c79264e 100644 --- a/src/libs6rc/s6rc_servicedir_unblock.c +++ b/src/libs6rc/s6rc_servicedir_unblock.c @@ -1,23 +1,11 @@ /* ISC license. */ -#include <string.h> -#include <errno.h> -#include <unistd.h> - #include <s6/supervise.h> #include <s6-rc/s6rc-servicedir.h> int s6rc_servicedir_unblock (char const *dir, int h) { - if (h) - { - size_t dirlen = strlen(dir) ; - char fn[dirlen + 6] ; - memcpy(fn, dir, dirlen) ; - memcpy(fn + dirlen, "/down", 6) ; - if (unlink(fn) < 0 && errno != ENOENT) return -1 ; - if (s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "u", 1) < 0) return -1 ; - } + if (h && s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "U", 1) < 0) return -1 ; return 0 ; } |