From 376481b8cd087d2484bb4966df85e847612eb9dd Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 12 Feb 2019 14:30:52 +0000 Subject: Fix xpathexec* exit codes when execve() fails! --- src/libstddjb/xpathexec_r.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstddjb/xpathexec_r.c') diff --git a/src/libstddjb/xpathexec_r.c b/src/libstddjb/xpathexec_r.c index 02628f3..a44fc0f 100644 --- a/src/libstddjb/xpathexec_r.c +++ b/src/libstddjb/xpathexec_r.c @@ -1,10 +1,12 @@ /* ISC license. */ +#include + #include #include void xpathexec_r (char const *const *argv, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen) { pathexec_r(argv, envp, envlen, modifs, modiflen) ; - strerr_dieexec(111, argv[0]) ; + strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ; } -- cgit v1.2.3