source: trunk/libs/newlib/src/newlib/libc/posix/execle.c @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 647 bytes
Line 
1#ifndef _NO_EXECVE
2
3/* execle.c */
4
5/* This and the other exec*.c files in this directory require
6   the target to provide the _execve syscall.  */
7
8#include <_ansi.h>
9#include <unistd.h>
10
11
12#include <stdarg.h>
13
14int
15execle (const char *path,
16      const char *arg0, ...)
17
18
19{
20  int i;
21  va_list args;
22  const char * const *envp;
23  const char *argv[256];
24
25  va_start (args, arg0);
26  argv[0] = arg0;
27  i = 1;
28  do
29    argv[i] = va_arg (args, const char *);
30  while (argv[i++] != NULL);
31  envp = va_arg (args, const char * const *);
32  va_end (args);
33
34  return _execve (path, (char * const *) argv, (char * const *) envp);
35}
36
37#endif /* !_NO_EXECVE  */
Note: See TracBrowser for help on using the repository browser.