summaryrefslogtreecommitdiff
path: root/src/libenvexec/mexec_afn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libenvexec/mexec_afn.c')
-rw-r--r--src/libenvexec/mexec_afn.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libenvexec/mexec_afn.c b/src/libenvexec/mexec_afn.c
new file mode 100644
index 0000000..278be11
--- /dev/null
+++ b/src/libenvexec/mexec_afn.c
@@ -0,0 +1,11 @@
+/* ISC license. */
+
+#include <skalibs/env.h>
+#include <skalibs/exec.h>
+
+void mexec_afn (char const *file, char const *const *argv, char const *const *envp, size_t envlen, char const *modif, size_t modiflen, size_t modifn)
+{
+ char const *newenvp[envlen + modifn + 1] ;
+ env_mergen(newenvp, envlen + modifn + 1, envp, envlen, modif, modiflen, modifn) ;
+ exec_ae(file, argv, newenvp) ;
+}