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/supervision/s6-notifyoncheck.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/supervision/s6-notifyoncheck.c') diff --git a/src/supervision/s6-notifyoncheck.c b/src/supervision/s6-notifyoncheck.c index b1ef96b..a1ec7ff 100644 --- a/src/supervision/s6-notifyoncheck.c +++ b/src/supervision/s6-notifyoncheck.c @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -176,7 +177,7 @@ int main (int argc, char const *const *argv, char const *const *envp) */ - if (pipe(p) < 0) strerr_diefu1sys(111, "pipe") ; + if (pipecoe(p) < 0) strerr_diefu1sys(111, "pipe") ; switch (df ? doublefork() : fork()) { case -1: strerr_diefu1sys(111, df ? "doublefork" : "fork") ; @@ -185,10 +186,8 @@ int main (int argc, char const *const *argv, char const *const *envp) { char c ; close((int)fd) ; - close(p[1]) ; if (read(p[0], &c, 1) < 1) strerr_diefu1x(111, "synchronize with child") ; - close(p[0]) ; - xpathexec_run(argv[0], argv, envp) ; + xexec_e(argv, envp) ; } } @@ -206,7 +205,7 @@ int main (int argc, char const *const *argv, char const *const *envp) x[1].fd = ftrigr_fd(&a) ; if (fd_write(p[1], "", 1) < 1) strerr_diefu1sys(2, "synchronize with parent") ; - fd_close(p[1]) ; + close(p[1]) ; /* Loop around a sleep and a ./data/check invocation */ -- cgit v1.2.3