diff --git a/libc/src/unistd.cpp b/libc/src/unistd.cpp index 9b871136..66115a62 100644 --- a/libc/src/unistd.cpp +++ b/libc/src/unistd.cpp @@ -42,7 +42,8 @@ static Result try_execvpe(const char* name, char* const* argv, char* const* { Vector shell_argv; TRY(shell_argv.try_append(const_cast("sh"))); - char* const* arg = argv; + TRY(shell_argv.try_append(file.mutable_data())); + char* const* arg = argv + 1; do { TRY(shell_argv.try_append(*arg)); } while (*(arg++));