1 /***********************************************************************/
5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
7 /* Copyright 1996 Institut National de Recherche en Informatique et */
8 /* en Automatique. All rights reserved. This file is distributed */
9 /* under the terms of the GNU Library General Public License, with */
10 /* the special exception on linking described in file ../../LICENSE. */
12 /***********************************************************************/
14 /* $Id: execve.c 4144 2001-12-07 13:41:02Z xleroy $ */
18 #include "unixsupport.h"
20 extern char ** cstringvect();
22 CAMLprim value unix_execve(value path, value args, value env)
26 argv = cstringvect(args);
27 envp = cstringvect(env);
28 (void) execve(String_val(path), argv, envp);
29 stat_free((char *) argv);
30 stat_free((char *) envp);
31 uerror("execve", path);
32 return Val_unit; /* never reached, but suppress warnings */
33 /* from smart compilers */