summaryrefslogtreecommitdiff
path: root/src/tls/s6tls_sync_and_exec_app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/s6tls_sync_and_exec_app.c')
-rw-r--r--src/tls/s6tls_sync_and_exec_app.c14
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) ;
}