2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 function execl().
8 #include <aros/debug.h>
15 /*****************************************************************************
27 Executes a file located in given path with specified arguments.
30 path - Pathname of the file to execute.
31 arg - First argument passed to the executed file.
32 ... - Other arguments passed to the executed file.
35 Returns -1 and sets errno appropriately in case of error, otherwise
45 execve(), execlp(), execv(), execvp()
49 ******************************************************************************/
53 char ***environptr
= __posixc_get_environptr();
54 char **environ
= (environptr
!= NULL
) ? *environptr
: NULL
;
58 if(!(argv
= __exec_valist2array(arg
, args
)))
66 APTR id
= __exec_prepare(path
, 0, argv
, environ
);
67 __exec_cleanup_array();
73 assert(0); /* Should not be reached */