From 02926ee3447b1ea0d04b53b8fcb08d8b1a4deec5 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 30 Apr 2024 19:09:43 +0000 Subject: Add mspawn functions to cspawn.h; move everything to libenvexec Signed-off-by: Laurent Bercot --- src/libenvexec/gmspawn_afn.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/libenvexec/gmspawn_afn.c (limited to 'src/libenvexec/gmspawn_afn.c') diff --git a/src/libenvexec/gmspawn_afn.c b/src/libenvexec/gmspawn_afn.c new file mode 100644 index 0000000..dc49017 --- /dev/null +++ b/src/libenvexec/gmspawn_afn.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include +#include + +pid_t gmspawn_afn (char const *file, char const *const *argv, char const *const *envp, size_t envlen, char const *modif, size_t modiflen, size_t modifn, uint16_t flags, cspawn_fileaction const *fa, size_t n) +{ + char const *newenvp[envlen + modifn + 1] ; + env_merge(newenvp, envlen + modifn + 1, envp, envlen, modif, modiflen) ; + return gcspawn(file, argv, newenvp, flags, fa, n) ; +} -- cgit v1.3.1