diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-11-10 11:28:19 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2023-11-10 11:28:19 +0000 |
| commit | 1e10d30b41b65dbd520e01adc5fe686cb92b0f12 (patch) | |
| tree | 32af8327cb6bb9aa6bbd5e20ee7a2cc1f9c95263 /src/tls/s6tls_sync_and_exec_app.c | |
| parent | c930181234bfb31fba0136d866e6e75633acafe0 (diff) | |
| download | s6-networking-1e10d30b41b65dbd520e01adc5fe686cb92b0f12.tar.gz | |
Prepare for 2.7.0.0. Better s6-tlsc-io interface.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/tls/s6tls_sync_and_exec_app.c')
| -rw-r--r-- | src/tls/s6tls_sync_and_exec_app.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) ; } |
