diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-02-12 14:30:52 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-02-12 14:30:52 +0000 |
commit | 376481b8cd087d2484bb4966df85e847612eb9dd (patch) | |
tree | 4acdd0759fbafc99eb03b556f12465a08c8e81e9 /src/libstddjb/xpathexec_r_name.c | |
parent | 92f85920b02ad5c9c4262c2c17778f69779c0604 (diff) | |
download | skalibs-376481b8cd087d2484bb4966df85e847612eb9dd.tar.xz |
Fix xpathexec* exit codes when execve() fails!
Diffstat (limited to 'src/libstddjb/xpathexec_r_name.c')
-rw-r--r-- | src/libstddjb/xpathexec_r_name.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstddjb/xpathexec_r_name.c b/src/libstddjb/xpathexec_r_name.c index 76eaf2e..cd118f5 100644 --- a/src/libstddjb/xpathexec_r_name.c +++ b/src/libstddjb/xpathexec_r_name.c @@ -1,10 +1,12 @@ /* ISC license. */ +#include <errno.h> + #include <skalibs/djbunix.h> #include <skalibs/strerr2.h> void xpathexec_r_name (char const *file, char const *const *argv, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen) { pathexec_r_name(file, argv, envp, envlen, modifs, modiflen) ; - strerr_dieexec(111, file) ; + strerr_dieexec(errno == ENOENT ? 127 : 126, file) ; } |