summaryrefslogtreecommitdiff
path: root/src/libs6
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-09 18:27:43 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-09 18:27:43 +0000
commitdd4afee4a8ea8c44126c44b31c6f1a36582d0964 (patch)
tree9ca57ff17554b33edc6a86be5e736bdc833f4158 /src/libs6
parentfddebb529fb620a9e038340fc554ec2e543802be (diff)
downloads6-dd4afee4a8ea8c44126c44b31c6f1a36582d0964.tar.xz
Get rid of webipc.h
Diffstat (limited to 'src/libs6')
-rw-r--r--src/libs6/s6_fdholder_start.c4
-rw-r--r--src/libs6/s6_supervise_link.c7
2 files changed, 6 insertions, 5 deletions
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 <skalibs/djbunix.h>
-#include <skalibs/webipc.h>
-#include <skalibs/unixconnection.h>
+#include <skalibs/socket.h>
+
#include <s6/s6-fdholder.h>
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) ;