From f2206da976508c2ad81c3e0949ecd311a5a06709 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 22 Aug 2017 10:56:01 +0000 Subject: Optimize to xpathexec ; prepare for 2.3.0.2 --- src/conn-tools/s6-tcpclient.c | 3 +-- src/conn-tools/s6-tcpserver-access.c | 6 ++---- src/conn-tools/s6-tcpserver.c | 3 +-- src/conn-tools/s6-tcpserver4-socketbinder.c | 3 +-- src/conn-tools/s6-tcpserver4.c | 3 +-- src/conn-tools/s6-tcpserver6-socketbinder.c | 3 +-- src/conn-tools/s6-tcpserver6.c | 3 +-- src/conn-tools/s6-tlsclient.c | 3 +-- src/conn-tools/s6-tlsserver.c | 3 +-- 9 files changed, 10 insertions(+), 20 deletions(-) (limited to 'src/conn-tools') diff --git a/src/conn-tools/s6-tcpclient.c b/src/conn-tools/s6-tcpclient.c index 47be4a7..062047c 100644 --- a/src/conn-tools/s6-tcpclient.c +++ b/src/conn-tools/s6-tcpclient.c @@ -374,6 +374,5 @@ int main (int argc, char const *const *argv) if (fd_move(6, s) < 0) strerr_diefu2sys(111, "set up fd ", "6") ; if (fd_copy(7, 6) < 0) strerr_diefu2sys(111, "set up fd ", "7") ; - pathexec(argv+2) ; - strerr_dieexec(111, argv[2]) ; + xpathexec(argv+2) ; } diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c index e16fe08..720da7e 100644 --- a/src/conn-tools/s6-tcpserver-access.c +++ b/src/conn-tools/s6-tcpserver-access.c @@ -379,12 +379,10 @@ int main (int argc, char const *const *argv, char const *const *envp) if (params.exec.len) { char *specialargv[4] = { EXECLINE_EXTBINPREFIX "execlineb", "-c", params.exec.s, 0 } ; - pathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ; - strerr_dieexec(111, specialargv[0]) ; + xpathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ; } - pathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; - strerr_dieexec(111, argv[0]) ; + xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; reject: if (verbosity >= 2) diff --git a/src/conn-tools/s6-tcpserver.c b/src/conn-tools/s6-tcpserver.c index 3866b75..1143af7 100644 --- a/src/conn-tools/s6-tcpserver.c +++ b/src/conn-tools/s6-tcpserver.c @@ -130,7 +130,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tcpserver4-socketbinder.c b/src/conn-tools/s6-tcpserver4-socketbinder.c index cc97486..e32eb4f 100644 --- a/src/conn-tools/s6-tcpserver4-socketbinder.c +++ b/src/conn-tools/s6-tcpserver4-socketbinder.c @@ -48,6 +48,5 @@ int main (int argc, char const *const *argv, char const *const *envp) if (backlog && socket_listen(0, backlog) < 0) strerr_diefu5sys(111, "listen to ", argv[0], ":", argv[1], " ") ; - pathexec_run(argv[2], argv + 2, envp) ; - strerr_dieexec(111, argv[2]) ; + xpathexec_run(argv[2], argv + 2, envp) ; } diff --git a/src/conn-tools/s6-tcpserver4.c b/src/conn-tools/s6-tcpserver4.c index 6860871..f97d307 100644 --- a/src/conn-tools/s6-tcpserver4.c +++ b/src/conn-tools/s6-tcpserver4.c @@ -123,7 +123,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tcpserver6-socketbinder.c b/src/conn-tools/s6-tcpserver6-socketbinder.c index 4fc3ab4..143bfe9 100644 --- a/src/conn-tools/s6-tcpserver6-socketbinder.c +++ b/src/conn-tools/s6-tcpserver6-socketbinder.c @@ -48,6 +48,5 @@ int main (int argc, char const *const *argv, char const *const *envp) if (backlog && socket_listen(0, backlog) < 0) strerr_diefu5sys(111, "listen to ", argv[0], ":", argv[1], " ") ; - pathexec_run(argv[2], argv + 2, envp) ; - strerr_dieexec(111, argv[2]) ; + xpathexec_run(argv[2], argv + 2, envp) ; } diff --git a/src/conn-tools/s6-tcpserver6.c b/src/conn-tools/s6-tcpserver6.c index 8648e8e..f96d45b 100644 --- a/src/conn-tools/s6-tcpserver6.c +++ b/src/conn-tools/s6-tcpserver6.c @@ -123,7 +123,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tlsclient.c b/src/conn-tools/s6-tlsclient.c index 5bcc7e7..267f457 100644 --- a/src/conn-tools/s6-tlsclient.c +++ b/src/conn-tools/s6-tlsclient.c @@ -197,7 +197,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tlsserver.c b/src/conn-tools/s6-tlsserver.c index d6c84f5..fa36226 100644 --- a/src/conn-tools/s6-tlsserver.c +++ b/src/conn-tools/s6-tlsserver.c @@ -242,7 +242,6 @@ int main (int argc, char const *const *argv, char const *const *envp) } while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } -- cgit v1.2.3