From 6b69c1f8921d0f692e9aaa65d21349e01ecc670b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 3 Jan 2018 12:09:01 +0000 Subject: Add child_spawn3, make textclient_startf use it --- src/libunixonacid/textclient_startf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libunixonacid/textclient_startf.c') diff --git a/src/libunixonacid/textclient_startf.c b/src/libunixonacid/textclient_startf.c index fd724cd..6a6f0fc 100644 --- a/src/libunixonacid/textclient_startf.c +++ b/src/libunixonacid/textclient_startf.c @@ -12,8 +12,8 @@ int textclient_startf (textclient_t *a, char const *const *argv, char const *const *envp, uint32_t options, char const *before, size_t beforelen, char const *after, size_t afterlen, tain_t const *deadline, tain_t *stamp) { struct iovec v ; - int fd[3] ; - pid_t pid = child_spawn(argv[0], argv, envp, fd, 3) ; + int fd[3] = { 0, 1 } ; + pid_t pid = child_spawn3(argv[0], argv, envp, fd) ; if (!pid) return 0 ; textmessage_receiver_init(&a->syncin, fd[0], a->syncbuf, TEXTCLIENT_BUFSIZE, TEXTMESSAGE_MAXLEN) ; textmessage_receiver_init(&a->asyncin, fd[2], a->asyncbuf, TEXTCLIENT_BUFSIZE, TEXTMESSAGE_MAXLEN) ; -- cgit v1.2.3