AcessNative - Implimented user side of SysSpawn
[tpg/acess2.git] / AcessNative / ld-acess_src / syscalls.c
index 3fdbc72..26f6c44 100644 (file)
@@ -9,6 +9,7 @@
 #include <string.h>
 #include <stddef.h>
 #include <unistd.h>
+#include <spawn.h>     // posix_spawn
 #include "request.h"
 
 #if SYSCALL_TRACE
@@ -335,3 +336,12 @@ int native_execve(const char *filename, const char *const argv[], const char *co
        perror("native_execve");
        return ret;
 }
+
+int native_spawn(const char *filename, const char *const argv[], const char *const envp[])
+{
+       int rv;
+       
+       rv = posix_spawn(NULL, filename, NULL, NULL, (void*)argv, (void*)envp);
+       
+       return rv;
+}

UCC git Repository :: git.ucc.asn.au