summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstddjb/xpathexec.c4
-rw-r--r--src/libstddjb/xpathexec0.c4
-rw-r--r--src/libstddjb/xpathexec0_run.c4
-rw-r--r--src/libstddjb/xpathexec_fromenv.c4
-rw-r--r--src/libstddjb/xpathexec_r.c4
-rw-r--r--src/libstddjb/xpathexec_r_name.c4
-rw-r--r--src/libstddjb/xpathexec_run.c4
7 files changed, 21 insertions, 7 deletions
diff --git a/src/libstddjb/xpathexec.c b/src/libstddjb/xpathexec.c
index 92e78dd..473f682 100644
--- a/src/libstddjb/xpathexec.c
+++ b/src/libstddjb/xpathexec.c
@@ -1,10 +1,12 @@
/* ISC license. */
+#include <errno.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
void xpathexec (char const *const *argv)
{
pathexec(argv) ;
- strerr_dieexec(111, argv[0]) ;
+ strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ;
}
diff --git a/src/libstddjb/xpathexec0.c b/src/libstddjb/xpathexec0.c
index c9c2c74..ed0848c 100644
--- a/src/libstddjb/xpathexec0.c
+++ b/src/libstddjb/xpathexec0.c
@@ -1,10 +1,12 @@
/* ISC license. */
+#include <errno.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
void xpathexec0 (char const *const *argv)
{
pathexec0(argv) ;
- strerr_dieexec(111, argv[0]) ;
+ strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ;
}
diff --git a/src/libstddjb/xpathexec0_run.c b/src/libstddjb/xpathexec0_run.c
index c24e931..ab3e645 100644
--- a/src/libstddjb/xpathexec0_run.c
+++ b/src/libstddjb/xpathexec0_run.c
@@ -1,10 +1,12 @@
/* ISC license. */
+#include <errno.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
void xpathexec0_run (char const *const *argv, char const *const *envp)
{
pathexec0_run(argv, envp) ;
- strerr_dieexec(111, argv[0]) ;
+ strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ;
}
diff --git a/src/libstddjb/xpathexec_fromenv.c b/src/libstddjb/xpathexec_fromenv.c
index e75b94a..c434331 100644
--- a/src/libstddjb/xpathexec_fromenv.c
+++ b/src/libstddjb/xpathexec_fromenv.c
@@ -1,10 +1,12 @@
/* ISC license. */
+#include <errno.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
void xpathexec_fromenv (char const *const *argv, char const *const *envp, size_t envlen)
{
pathexec_fromenv(argv, envp, envlen) ;
- strerr_dieexec(111, argv[0]) ;
+ strerr_dieexec(errno == ENOENT ? 127 : 126, argv[0]) ;
}
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 <errno.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
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]) ;
}
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) ;
}
diff --git a/src/libstddjb/xpathexec_run.c b/src/libstddjb/xpathexec_run.c
index 3596f2f..7c054ee 100644
--- a/src/libstddjb/xpathexec_run.c
+++ b/src/libstddjb/xpathexec_run.c
@@ -1,10 +1,12 @@
/* ISC license. */
+#include <errno.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
void xpathexec_run (char const *file, char const *const *argv, char const *const *envp)
{
pathexec_run(file, argv, envp) ;
- strerr_dieexec(111, file) ;
+ strerr_dieexec(errno == ENOENT ? 127 : 126, file) ;
}