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/daemontools-extras/s6-setlock.c | |
parent | bdef68e12278ddfc5080732bd3b28dd5135c9d3a (diff) | |
download | s6-1f7a397ea589f31ab8e8eed72ebc2933ddb229a9.tar.xz |
Adapt to new exec.h
Diffstat (limited to 'src/daemontools-extras/s6-setlock.c')
-rw-r--r-- | src/daemontools-extras/s6-setlock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/daemontools-extras/s6-setlock.c b/src/daemontools-extras/s6-setlock.c index 83741ac..bc50519 100644 --- a/src/daemontools-extras/s6-setlock.c +++ b/src/daemontools-extras/s6-setlock.c @@ -3,6 +3,7 @@ #include <unistd.h> #include <errno.h> #include <signal.h> + #include <skalibs/allreadwrite.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> @@ -10,6 +11,8 @@ #include <skalibs/tai.h> #include <skalibs/iopause.h> #include <skalibs/djbunix.h> +#include <skalibs/exec.h> + #include <s6/config.h> #define USAGE "s6-setlock [ -r | -w ] [ -n | -N | -t timeout ] lockfile prog..." @@ -20,7 +23,7 @@ typedef lockfunc_t *lockfunc_t_ref ; static lockfunc_t_ref f[2][2] = { { &lock_sh, &lock_shnb }, { &lock_ex, &lock_exnb } } ; -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { unsigned int nb = 0, ex = 1 ; unsigned int timeout = 0 ; @@ -82,5 +85,5 @@ int main (int argc, char const *const *argv, char const *const *envp) fd_close(p[0]) ; if (uncoe(p[1]) < 0) strerr_diefu1sys(111, "uncoe fd to helper") ; } - xpathexec_run(argv[1], argv+1, envp) ; + xexec(argv+1) ; } |