summaryrefslogtreecommitdiff
path: root/src/libenvexec/xexecvep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libenvexec/xexecvep.c')
-rw-r--r--src/libenvexec/xexecvep.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libenvexec/xexecvep.c b/src/libenvexec/xexecvep.c
new file mode 100644
index 0000000..c272401
--- /dev/null
+++ b/src/libenvexec/xexecvep.c
@@ -0,0 +1,13 @@
+/* ISC license. */
+
+#include <errno.h>
+
+#include <skalibs/posixplz.h>
+#include <skalibs/strerr2.h>
+#include <skalibs/exec.h>
+
+void xexecvep (char const *file, char const *const *argv, char const *const *envp, char const *path)
+{
+ execvep(file, argv, envp, path) ;
+ strerr_dieexec(errno == ENOENT ? 127 : 126, file) ;
+}