diff options
author | dzwdz | 2022-07-27 13:59:52 +0200 |
---|---|---|
committer | dzwdz | 2022-07-27 13:59:52 +0200 |
commit | c77b0fa7916f79c099ee4a6a80a093334e9090ac (patch) | |
tree | 19eaedcecaa1584b83342853f1616975b50cad97 /src/user/app/shell | |
parent | 55b3a04e97b7ddd0db17a4fc3ba35461b106b92f (diff) |
user/libc: execve() supports passing argv now
Diffstat (limited to 'src/user/app/shell')
-rw-r--r-- | src/user/app/shell/shell.c | 4 |
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); } |