From 523036ef1e6e4bd7047ec21a6e68b7508569db91 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 22 Aug 2017 15:10:36 +0000 Subject: More conversion to xpathexec, make exit code change consistent across binaries --- src/execline/background.c | 3 ++- src/execline/pipeline.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/execline/background.c b/src/execline/background.c index dc7a01a..e8def5b 100644 --- a/src/execline/background.c +++ b/src/execline/background.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -46,7 +47,7 @@ int main (int argc, char const **argv, char const *const *envp) case 0: PROG = "background (grandchild)" ; pathexec0_run(argv, envp) ; - strerr_dieexec(127, argv[0]) ; + strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ; } } else diff --git a/src/execline/pipeline.c b/src/execline/pipeline.c index 3017ea2..f61c35b 100644 --- a/src/execline/pipeline.c +++ b/src/execline/pipeline.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -52,7 +53,7 @@ int main (int argc, char const **argv, char const *const *envp) fd_close(p[w]) ; if (fd_move(!w, p[!w]) < 0) strerr_diefu1sys(111, "fd_move") ; pathexec0_run(argv, envp) ; - strerr_dieexec(127, argv[0]) ; + strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ; } fd_close(p[!w]) ; fd = p[w] ; -- cgit v1.2.3