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/xmspawn_af.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/libenvexec/xmspawn_af.c (limited to 'src/libenvexec/xmspawn_af.c') diff --git a/src/libenvexec/xmspawn_af.c b/src/libenvexec/xmspawn_af.c new file mode 100644 index 0000000..3e79114 --- /dev/null +++ b/src/libenvexec/xmspawn_af.c @@ -0,0 +1,13 @@ +/* ISC license. */ + +#include + +#include +#include + +pid_t xmspawn_af (char const *file, char const *const *argv, char const *const *envp, size_t envlen, uint16_t flags, cspawn_fileaction const *fa, size_t n) +{ + pid_t pid = mspawn_af(file, argv, envp, envlen, flags, fa, n) ; + if (!pid) strerr_diefu2sys(errno == ENOENT ? 127 : 126, "spawn ", file) ; + return pid ; +} -- cgit v1.2.3