diff options
Diffstat (limited to 'otherlibs/unix/execve.c')
-rw-r--r-- | otherlibs/unix/execve.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/otherlibs/unix/execve.c b/otherlibs/unix/execve.c new file mode 100644 index 000000000..ecdad4104 --- /dev/null +++ b/otherlibs/unix/execve.c @@ -0,0 +1,21 @@ +#include <mlvalues.h> +#include <memory.h> +#include "unix.h" + +extern char ** cstringvect(); + +value unix_execve(path, args, env) /* ML */ + value path, args, env; +{ + char ** argv; + char ** envp; + argv = cstringvect(args); + envp = cstringvect(env); + (void) execve(String_val(path), argv, envp); + stat_free((char *) argv); + stat_free((char *) envp); + uerror("execve", path); + return Val_unit; /* never reached, but suppress warnings */ + /* from smart compilers */ +} + |