Updated PCI IDs to latest snapshot.
[tangerine.git] / compiler / clib / execv.c
blob4a6229dbccf93ff5575234d16ba7bd1abc3de045
1 /*
2 Copyright © 2008-2009, The AROS Development Team. All rights reserved.
3 $Id$
5 POSIX function execv().
6 */
8 #include <aros/debug.h>
10 #include <fcntl.h>
11 #include <unistd.h>
12 #include <errno.h>
13 #include <assert.h>
14 #include <stdlib.h>
16 #include "__exec.h"
18 /*****************************************************************************
20 NAME */
21 #include <unistd.h>
23 int execv(
25 /* SYNOPSIS */
26 const char *path,
27 char *const argv[])
29 /* FUNCTION
30 Executes a file located in given path with specified arguments.
32 INPUTS
33 path - Pathname of the file to execute.
34 argv - Array of arguments given to main() function of the executed
35 file.
37 RESULT
38 Returns -1 and sets errno appropriately in case of error, otherwise
39 doesn't return.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 execve(), execl(), execlp(), execvp()
50 INTERNALS
52 ******************************************************************************/
54 APTR id = __exec_prepare(path, 0, argv, environ);
55 if (!id)
56 return -1;
58 __exec_do(id);
60 assert(0); /* Should not be reached */
61 return -1;
62 } /* execv() */