From dd4afee4a8ea8c44126c44b31c6f1a36582d0964 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 9 Dec 2020 18:27:43 +0000 Subject: Get rid of webipc.h --- src/libs6/s6_fdholder_start.c | 4 ++-- src/libs6/s6_supervise_link.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/libs6') diff --git a/src/libs6/s6_fdholder_start.c b/src/libs6/s6_fdholder_start.c index 2fb81d8..38bbfb2 100644 --- a/src/libs6/s6_fdholder_start.c +++ b/src/libs6/s6_fdholder_start.c @@ -1,8 +1,8 @@ /* ISC license. */ #include -#include -#include +#include + #include int s6_fdholder_start (s6_fdholder_t *a, char const *path, tain_t const *deadline, tain_t *stamp) diff --git a/src/libs6/s6_supervise_link.c b/src/libs6/s6_supervise_link.c index 118d66c..4258e18 100644 --- a/src/libs6/s6_supervise_link.c +++ b/src/libs6/s6_supervise_link.c @@ -68,9 +68,9 @@ int s6_supervise_link (char const *scdir, char const *const *servicedirs, size_t } { + stralloc lnames = STRALLOC_ZERO ; ftrigr_t a = FTRIGR_ZERO ; stralloc rpsa = STRALLOC_ZERO ; - stralloc lnames = STRALLOC_ZERO ; gid_t gid = options & 2 ? -1 : getegid() ; size_t scdirlen = strlen(scdir) ; size_t prefixlen = strlen(prefix) ; @@ -91,13 +91,14 @@ int s6_supervise_link (char const *scdir, char const *const *servicedirs, size_t char *p ; size_t len = strlen(servicedirs[i]) ; memcpy(fn, servicedirs[i], len) ; - memcpy(fn + len, S6_SUPERVISE_EVENTDIR, sizeof(S6_SUPERVISE_EVENTDIR)) ; + fn[len] = '/' ; + memcpy(fn + len + 1, S6_SUPERVISE_EVENTDIR, sizeof(S6_SUPERVISE_EVENTDIR)) ; if (!ftrigw_fifodir_make(fn, gid, options & 1)) goto err ; ids[m] = ftrigr_subscribe(&a, fn, "s", 0, deadline, stamp) ; if (!ids[m++]) goto err ; if (bitarray_peek(logged, i)) { - memcpy(fn + len, "/log/", 5) ; + memcpy(fn + len + 1, "log/", 4) ; memcpy(fn + len + 5, S6_SUPERVISE_EVENTDIR, sizeof(S6_SUPERVISE_EVENTDIR)) ; if (!ftrigw_fifodir_make(fn, gid, options & 1)) goto err ; ids[m] = ftrigr_subscribe(&a, fn, "s", 0, deadline, stamp) ; -- cgit v1.2.3