summaryrefslogtreecommitdiff
path: root/src/user/app/shell
diff options
context:
space:
mode:
authordzwdz2022-07-27 13:59:52 +0200
committerdzwdz2022-07-27 13:59:52 +0200
commitc77b0fa7916f79c099ee4a6a80a093334e9090ac (patch)
tree19eaedcecaa1584b83342853f1616975b50cad97 /src/user/app/shell
parent55b3a04e97b7ddd0db17a4fc3ba35461b106b92f (diff)
user/libc: execve() supports passing argv now
Diffstat (limited to 'src/user/app/shell')
-rw-r--r--src/user/app/shell/shell.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/app/shell/shell.c b/src/user/app/shell/shell.c
index d002b38..0196d5b 100644
--- a/src/user/app/shell/shell.c
+++ b/src/user/app/shell/shell.c
@@ -61,7 +61,9 @@ static void execp(const char *cmd) {
memcpy(s, "/bin/", 5);
memcpy(s + 5, cmd, cmdlen + 1);
- execv(s, NULL);
+ char *argv[] = {(char*)cmd, NULL};
+
+ execv(s, argv);
free(s);
}