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/conn-tools/s6-connlimit.c | |
parent | bdef68e12278ddfc5080732bd3b28dd5135c9d3a (diff) | |
download | s6-1f7a397ea589f31ab8e8eed72ebc2933ddb229a9.tar.xz |
Adapt to new exec.h
Diffstat (limited to 'src/conn-tools/s6-connlimit.c')
-rw-r--r-- | src/conn-tools/s6-connlimit.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/conn-tools/s6-connlimit.c b/src/conn-tools/s6-connlimit.c index b34d411..959c421 100644 --- a/src/conn-tools/s6-connlimit.c +++ b/src/conn-tools/s6-connlimit.c @@ -1,17 +1,18 @@ /* ISC license. */ #include <string.h> +#include <stdlib.h> + #include <skalibs/types.h> #include <skalibs/strerr2.h> -#include <skalibs/env.h> -#include <skalibs/djbunix.h> +#include <skalibs/exec.h> -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { char const *x ; size_t protolen ; PROG = "s6-connlimit" ; - x = env_get2(envp, "PROTO") ; + x = getenv("PROTO") ; if (!x) strerr_dienotset(100, "PROTO") ; protolen = strlen(x) ; if (!protolen) strerr_dief1x(100, "empty PROTO") ; @@ -20,11 +21,11 @@ int main (int argc, char const *const *argv, char const *const *envp) char s[protolen + 8] ; memcpy(s, x, protolen) ; memcpy(s + protolen, "CONNNUM", 8) ; - x = env_get2(envp, s) ; + x = getenv(s) ; if (!x) strerr_dienotset(100, s) ; if (!uint0_scan(x, &num)) strerr_dief2x(100, "invalid ", s) ; memcpy(s + protolen + 4, "MAX", 4) ; - x = env_get2(envp, s) ; + x = getenv(s) ; if (x) { unsigned int max ; @@ -34,5 +35,5 @@ int main (int argc, char const *const *argv, char const *const *envp) } } (void)argc ; - xpathexec0_run(argv+1, envp) ; + xexec0(argv+1) ; } |