2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 POSIX function execvp().
8 #include <aros/debug.h>
16 #include "__arosc_privdata.h"
19 /*****************************************************************************
31 Executes a file with given name. The search paths for the executed
32 file are paths specified in the PATH environment variable.
35 file - Name of the file to execute.
36 argv - Array of arguments given to main() function of the executed
40 Returns -1 and sets errno appropriately in case of error, otherwise
50 execve(), execl(), execlp(), execv()
54 ******************************************************************************/
56 char ***environptr
= __arosc_get_environptr();
57 char **environ
= (environptr
!= NULL
) ? *environptr
: NULL
;
58 APTR id
= __exec_prepare(file
, 1, argv
, environ
);
64 assert(0); /* not reached */