aboutsummaryrefslogtreecommitdiffstats
path: root/src/unistd/fexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd/fexec.c')
-rw-r--r--src/unistd/fexec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unistd/fexec.c b/src/unistd/fexec.c
index bf2c392..7a8d4f5 100644
--- a/src/unistd/fexec.c
+++ b/src/unistd/fexec.c
@@ -40,7 +40,7 @@ extern char** environ;
*
* @throws Any error specified for execve(2).
*/
-static void vexec(int fd, va_list argv, int fetch_envp)
+static void vfexec(int fd, va_list argv, int fetch_envp)
{
char* const* envp = environ;
size_t n = 0, i;
@@ -84,7 +84,7 @@ int fexecl(int fd, ... /*, NULL */)
{
int saved_errno;
va_list argv;
- va_start(argv, path);
+ va_start(argv, fd);
vfexec(fd, argv, 0);
saved_errno = errno;
va_end(argv);
@@ -116,7 +116,7 @@ int fexecle(int fd, ... /*, NULL, char* const envp[] */)
{
int saved_errno;
va_list argv;
- va_start(argv, path);
+ va_start(argv, fd);
vfexec(fd, argv, 1);
saved_errno = errno;
va_end(argv);