From c77b0fa7916f79c099ee4a6a80a093334e9090ac Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 27 Jul 2022 13:59:52 +0200 Subject: user/libc: execve() supports passing argv now --- src/user/app/shell/shell.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/user/app/shell') 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); } -- cgit v1.2.3