2000-02-18 03:39:52 +08:00
|
|
|
/* execv.c */
|
|
|
|
|
|
|
|
/* This and the other exec*.c files in this directory require
|
|
|
|
the target to provide the _execve syscall. */
|
|
|
|
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2000-11-23 02:26:10 +08:00
|
|
|
/* Only deal with a pointer to environ, to work around subtle bugs with shared
|
|
|
|
libraries and/or small data systems where the user declares his own
|
|
|
|
'environ'. */
|
|
|
|
static char ***p_environ = &environ;
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
int
|
|
|
|
_DEFUN (execv, (path, argv),
|
|
|
|
const char *path _AND
|
|
|
|
char * const argv[])
|
|
|
|
{
|
2000-11-23 02:26:10 +08:00
|
|
|
return _execve (path, (char * _CONST *) argv, *p_environ);
|
2000-02-18 03:39:52 +08:00
|
|
|
}
|