diff options
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) ; } |