summaryrefslogtreecommitdiff
path: root/src/daemontools-extras/s6-setlock.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-01-03 14:11:10 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-01-03 14:11:10 +0000
commitf0c0a6da2d4d9162d09c0662598e18e82d9bd917 (patch)
tree03f37492dd0084ce5ead4940ed2e43e0bf5f5012 /src/daemontools-extras/s6-setlock.c
parentd7242bda59ec2ec056508b39cb532b5e7318dd13 (diff)
downloads6-f0c0a6da2d4d9162d09c0662598e18e82d9bd917.tar.xz
Use child_spawn2 instead of child_spawn in s6-setlock
Diffstat (limited to 'src/daemontools-extras/s6-setlock.c')
-rw-r--r--src/daemontools-extras/s6-setlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemontools-extras/s6-setlock.c b/src/daemontools-extras/s6-setlock.c
index 086c2f6..4bd4d14 100644
--- a/src/daemontools-extras/s6-setlock.c
+++ b/src/daemontools-extras/s6-setlock.c
@@ -54,13 +54,13 @@ int main (int argc, char const *const *argv, char const *const *envp)
char const *cenvp[2] = { ex ? "S6LOCK_EX=1" : 0, 0 } ;
iopause_fd x = { .events = IOPAUSE_READ } ;
tain_t deadline ;
- int p[2] ;
+ int p[2] = { 0, 1 } ;
pid_t pid ;
char c ;
tain_now_g() ;
tain_from_millisecs(&deadline, timeout) ;
tain_add_g(&deadline, &deadline) ;
- pid = child_spawn(S6_LIBEXECPREFIX "s6lockd-helper", cargv, cenvp, p, 2) ;
+ pid = child_spawn2(S6_LIBEXECPREFIX "s6lockd-helper", cargv, cenvp, p) ;
if (!pid) strerr_diefu2sys(111, "spawn ", S6_LIBEXECPREFIX "s6lockd-helper") ;
x.fd = p[0] ;
for (;;)