aboutsummaryrefslogtreecommitdiffstats
path: root/libc/unistd/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/exec.c')
-rw-r--r--libc/unistd/exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c
index cbb98b366..89396ac31 100644
--- a/libc/unistd/exec.c
+++ b/libc/unistd/exec.c
@@ -194,9 +194,9 @@ execvp(const char *name, char * const *argv)
(void)writev(STDERR_FILENO, iov, 3);
continue;
}
- bcopy(p, buf, lp);
+ memcpy(buf, p, lp);
buf[lp] = '/';
- bcopy(name, buf + lp + 1, ln);
+ memcpy(buf + lp + 1, name, ln);
buf[lp + ln + 1] = '\0';
retry: (void)execve(bp, argv, environ);
@@ -216,7 +216,7 @@ retry: (void)execve(bp, argv, environ);
goto done;
memp[0] = "sh";
memp[1] = bp;
- bcopy(argv + 1, memp + 2, cnt * sizeof(char *));
+ memcpy(memp + 2, argv + 1, cnt * sizeof(char *));
(void)execve(_PATH_BSHELL, memp, environ);
goto done;
case ENOMEM: