From 1f7a397ea589f31ab8e8eed72ebc2933ddb229a9 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 28 Nov 2020 12:38:56 +0000 Subject: Adapt to new exec.h --- src/daemontools-extras/s6-fghack.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/daemontools-extras/s6-fghack.c') diff --git a/src/daemontools-extras/s6-fghack.c b/src/daemontools-extras/s6-fghack.c index 5981b96..a2f1f2b 100644 --- a/src/daemontools-extras/s6-fghack.c +++ b/src/daemontools-extras/s6-fghack.c @@ -3,13 +3,15 @@ #include #include #include + #include #include #include +#include #define USAGE "s6-fghack prog..." -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { int p[2] ; int pcoe[2] ; @@ -26,19 +28,19 @@ int main (int argc, char const *const *argv, char const *const *envp) case 0 : { int i = 0 ; - fd_close(p[0]) ; - fd_close(pcoe[0]) ; + close(p[0]) ; + close(pcoe[0]) ; if (coe(pcoe[1]) < 0) _exit(111) ; for (; i < 30 ; i++) dup(p[1]) ; /* hack. gcc's warning is justified. */ - pathexec_run(argv[1], argv+1, envp) ; + exec(argv+1) ; i = errno ; if (fd_write(pcoe[1], "", 1) < 1) _exit(111) ; _exit(i) ; } } - fd_close(p[1]) ; - fd_close(pcoe[1]) ; + close(p[1]) ; + close(pcoe[1]) ; switch (fd_read(pcoe[0], &dummy, 1)) { -- cgit v1.2.3