Reverted latest changes.
[reactos.git] / reactos / lib / msvcrt / process / execl.c
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2
3 #include <msvcrt/process.h>
4 #include <msvcrt/stdlib.h>
5 #include <msvcrt/stdarg.h>
6
7 int _execl(const char* szPath, const char* szArgv0, ...)
8 {
9 char *szArg[100];
10 const char *a;
11 int i = 0;
12 va_list l = 0;
13 va_start(l,szArgv0);
14 do {
15 a = va_arg(l,const char *);
16 szArg[i++] = (char *)a;
17 } while ( a != NULL && i < 100 );
18
19 return _spawnve(P_OVERLAY, szPath, szArg, _environ);
20 }