From 97f206f4f692317b2cef99537f550388df95c5db Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 18 Feb 2023 14:52:20 +0000 Subject: Prepare for 0.5.4.1; ensure livedir always has a lock file Signed-off-by: Laurent Bercot --- src/libs6rc/s6rc_livedir_create.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libs6rc') diff --git a/src/libs6rc/s6rc_livedir_create.c b/src/libs6rc/s6rc_livedir_create.c index bd44bd6..e4056b1 100644 --- a/src/libs6rc/s6rc_livedir_create.c +++ b/src/libs6rc/s6rc_livedir_create.c @@ -1,13 +1,16 @@ /* ISC license. */ #include + #include #include #include #include #include + #include #include + #include int s6rc_livedir_create (stralloc *sa, char const *live, char const *suffix, char const *scdir, char const *prefix, char const *compiled, unsigned char const *state, unsigned int statelen, size_t *dirlen) @@ -33,6 +36,8 @@ int s6rc_livedir_create (stralloc *sa, char const *live, char const *suffix, cha if (!openwritenclose_unsafe(sa->s + sabase, prefix, strlen(prefix))) goto delerr ; strcpy(sa->s + newlen, "state") ; if (!openwritenclose_unsafe(sa->s + sabase, (char const *)state, statelen)) goto delerr ; + strcpy(sa->s + newlen, "lock") ; + if (!openwritenclose_unsafe(sa->s + sabase, "", 0)) goto delerr ; sa->len = newlen-1 ; sa->s[newlen-1] = 0 ; *dirlen = ddirlen ; -- cgit v1.2.3