summaryrefslogtreecommitdiff
path: root/src/libposixplz/execvep_loose.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-02-14 17:16:53 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-02-14 17:16:53 +0000
commitccb423ed6f317da5a02f4feeda082d791215a4ba (patch)
tree8bd8cf32c0e36f7748c077edcbb4f9886aa7dfb4 /src/libposixplz/execvep_loose.c
parent7886cf7020c49586e41aed190165dc6e134e9a5c (diff)
downloadskalibs-ccb423ed6f317da5a02f4feeda082d791215a4ba.tar.xz
Add execvep_loose, prepare for 2.6.4.0
Diffstat (limited to 'src/libposixplz/execvep_loose.c')
-rw-r--r--src/libposixplz/execvep_loose.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libposixplz/execvep_loose.c b/src/libposixplz/execvep_loose.c
new file mode 100644
index 0000000..7506362
--- /dev/null
+++ b/src/libposixplz/execvep_loose.c
@@ -0,0 +1,13 @@
+/* ISC license. */
+
+#include <unistd.h>
+#include <skalibs/posixplz.h>
+#include "posixplz-internal.h"
+
+void execvep_loose (char const *file, char const *const *argv, char const *const *envp, char const *path)
+{
+ if (file[0] == '/')
+ execve(file, (char *const *)argv, (char *const *)envp) ;
+ else
+ execvep_internal(file, argv, envp, path) ;
+}