From 1e10d30b41b65dbd520e01adc5fe686cb92b0f12 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 10 Nov 2023 11:28:19 +0000 Subject: Prepare for 2.7.0.0. Better s6-tlsc-io interface. Signed-off-by: Laurent Bercot --- src/tls/s6tls_sync_and_exec_app.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/tls/s6tls_sync_and_exec_app.c') diff --git a/src/tls/s6tls_sync_and_exec_app.c b/src/tls/s6tls_sync_and_exec_app.c index 56e8dc1..a5059ef 100644 --- a/src/tls/s6tls_sync_and_exec_app.c +++ b/src/tls/s6tls_sync_and_exec_app.c @@ -9,16 +9,16 @@ #define MAXENVSIZE 4096 -void s6tls_sync_and_exec_app (char const *const *argv, int const p[4][2], pid_t pid, uint32_t options) +void s6tls_sync_and_exec_app (char const *const *argv, int const *p, pid_t pid, uint32_t options) { char buf[MAXENVSIZE] ; ssize_t r ; - close(p[2][1]) ; - close(p[1][1]) ; - close(p[0][0]) ; - if (fd_move(p[3][0], p[1][0]) == -1 || fd_move(p[3][1], p[0][1]) == -1) + close(p[5]) ; + close(p[3]) ; + close(p[0]) ; + if (fd_move(p[6], p[2]) == -1 || fd_move(p[7], p[1]) == -1) strerr_diefu1sys(111, "move file descriptors") ; - r = read(p[2][0], buf, MAXENVSIZE) ; + r = read(p[4], buf, MAXENVSIZE) ; if (r < 0) strerr_diefu1sys(111, "read from handshake notification pipe") ; if (!r) { @@ -28,6 +28,6 @@ void s6tls_sync_and_exec_app (char const *const *argv, int const p[4][2], pid_t _exit(wait_estatus(wstat)) ; } if (r >= MAXENVSIZE) strerr_dief1x(101, "SSL data too large; recompile with a bigger MAXENVSIZE") ; - close(p[2][0]) ; + close(p[4]) ; s6tls_clean_and_exec(argv, options, buf, r-1) ; } -- cgit v1.3.1