d15461f3b2cdbc712e845120e8703a509be9362b
[reactos.git] / lib / crtdll / process / execlp.c
1 #include <msvcrt/process.h>
2 #include <msvcrt/stdlib.h>
3 #include <msvcrt/stdarg.h>
4
5 /*
6  * @implemented
7  */
8 int _execlp(const char *szPath, const char *szArgv0, ...)
9 {
10   char *szArg[100];
11   const char *a;
12   int i = 0;
13   va_list l = 0;
14   va_start(l,szArgv0);
15   do {
16         a = (const char *)va_arg(l,const char *);
17         szArg[i++] = (char *)a;
18   } while ( a != NULL && i < 100 );
19   return _spawnvpe(P_OVERLAY, szPath,szArg, _environ);
20 }