diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-28 12:38:56 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-28 12:38:56 +0000 |
commit | 1f7a397ea589f31ab8e8eed72ebc2933ddb229a9 (patch) | |
tree | cb4e418146839514fbca2f805a7a4e4ee3918324 /src/fdholder | |
parent | bdef68e12278ddfc5080732bd3b28dd5135c9d3a (diff) | |
download | s6-1f7a397ea589f31ab8e8eed72ebc2933ddb229a9.tar.xz |
Adapt to new exec.h
Diffstat (limited to 'src/fdholder')
-rw-r--r-- | src/fdholder/s6-fdholder-daemon.c | 8 | ||||
-rw-r--r-- | src/fdholder/s6-fdholder-getdump.c | 6 | ||||
-rw-r--r-- | src/fdholder/s6-fdholder-retrieve.c | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/fdholder/s6-fdholder-daemon.c b/src/fdholder/s6-fdholder-daemon.c index ba057d2..a233db1 100644 --- a/src/fdholder/s6-fdholder-daemon.c +++ b/src/fdholder/s6-fdholder-daemon.c @@ -2,16 +2,18 @@ #include <sys/types.h> #include <limits.h> + #include <skalibs/types.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> -#include <skalibs/djbunix.h> +#include <skalibs/exec.h> + #include <s6/config.h> #define USAGE "s6-fdholder-daemon [ -v verbosity ] [ -d | -D ] [ -1 ] [ -c maxconn ] [ -n maxfds ] [ -b backlog ] [ -G gid,gid,... ] [ -g gid ] [ -u uid ] [ -U ] [ -t timeout ] [ -T lameducktimeout ] [ -i rulesdir | -x rulesfile ] path" #define dieusage() strerr_dieusage(100, USAGE) -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { unsigned int verbosity = 1 ; int flag1 = 0 ; @@ -150,6 +152,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = rulesfile ; } newargv[m++] = 0 ; - xpathexec_run(newargv[0], newargv, envp) ; + xexec(newargv) ; } } diff --git a/src/fdholder/s6-fdholder-getdump.c b/src/fdholder/s6-fdholder-getdump.c index 34aeeb7..da99797 100644 --- a/src/fdholder/s6-fdholder-getdump.c +++ b/src/fdholder/s6-fdholder-getdump.c @@ -2,13 +2,15 @@ #include <string.h> #include <limits.h> + #include <skalibs/types.h> #include <skalibs/strerr2.h> #include <skalibs/sgetopt.h> #include <skalibs/tai.h> -#include <skalibs/env.h> #include <skalibs/djbunix.h> #include <skalibs/genalloc.h> +#include <skalibs/exec.h> + #include <s6/s6-fdholder.h> #define USAGE "s6-fdholder-getdump [ -t timeout ] socket prog..." @@ -81,6 +83,6 @@ int main (int argc, char const *const *argv, char const *const *envp) } modifs[pos++] = 0 ; } - xpathexec_r(argv+1, envp, env_len(envp), modifs, pos) ; + xmexec_n(argv+1, modifs, pos, 1 + 3*n) ; } } diff --git a/src/fdholder/s6-fdholder-retrieve.c b/src/fdholder/s6-fdholder-retrieve.c index ebfd2ed..c1a0cd6 100644 --- a/src/fdholder/s6-fdholder-retrieve.c +++ b/src/fdholder/s6-fdholder-retrieve.c @@ -5,12 +5,14 @@ #include <skalibs/sgetopt.h> #include <skalibs/tai.h> #include <skalibs/djbunix.h> +#include <skalibs/exec.h> + #include <s6/s6-fdholder.h> #define USAGE "s6-fdholder-retrieve [ -D ] [ -t timeout ] socket id prog..." #define dieusage() strerr_dieusage(100, USAGE) -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { s6_fdholder_t a = S6_FDHOLDER_ZERO ; tain_t deadline ; @@ -49,5 +51,5 @@ int main (int argc, char const *const *argv, char const *const *envp) if (uncoe(0) < 0) strerr_diefu1sys(111, "uncoe stdin") ; } else if (fd_move(0, fd) < 0) strerr_diefu1sys(111, "move fd") ; - xpathexec_run(argv[2], argv+2, envp) ; + xexec(argv+2) ; } |