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