summaryrefslogtreecommitdiff
path: root/src/libs6/s6lockd.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-02 05:24:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-02 05:24:24 +0000
commit8873c303fefaed17f6777989f929612a99675a00 (patch)
tree26efa9863177ec574d4351e8db84a47566a2af98 /src/libs6/s6lockd.c
parent2a73901e12a1f3b498e6901ef607b55f9f193097 (diff)
downloads6-8873c303fefaed17f6777989f929612a99675a00.tar.xz
Fix build against skalibs-2.10.0.0
Diffstat (limited to 'src/libs6/s6lockd.c')
-rw-r--r--src/libs6/s6lockd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs6/s6lockd.c b/src/libs6/s6lockd.c
index afa8b3e..f2d18f9 100644
--- a/src/libs6/s6lockd.c
+++ b/src/libs6/s6lockd.c
@@ -131,8 +131,8 @@ static int parse_protocol (struct iovec const *v, void *context)
case '<' : /* lock path */
{
s6lockio_t f = S6LOCKIO_ZERO ;
- char const *cargv[3] = { S6LOCKD_HELPER_PROG, 0, 0 } ;
- char const *cenvp[2] = { 0, 0 } ;
+ char const *cargv[4] = { S6LOCKD_HELPER_PROG, "r", 0, 0 } ;
+ char const *nullenv = 0 ;
uint32_t options, pathlen ;
if (v->iov_len < 23)
{
@@ -150,9 +150,9 @@ static int parse_protocol (struct iovec const *v, void *context)
f.id = id ;
s[21] = '.' ;
s[22] = '/' ;
- cargv[1] = (char const *)s + 21 ;
- if (options & S6LOCK_OPTIONS_EX) cenvp[0] = "S6LOCK_EX=1" ;
- f.pid = child_spawn2(cargv[0], cargv, cenvp, f.p) ;
+ if (options & S6LOCK_OPTIONS_EX) cargv[1] = "w" ;
+ cargv[2] = (char const *)s + 21 ;
+ f.pid = child_spawn2(cargv[0], cargv, &nullenv, f.p) ;
if (!f.pid)
{
answer(errno) ;