Commit f805c49b authored by Swann Perarnau's avatar Swann Perarnau

[fix] Emulate shell path expansion for exec

execv doesn't search the path for binaries, making it harder to execute
commands. execvp can be used instead.
parent 72d317b4
...@@ -773,7 +773,7 @@ int main(int argc, char** argv) ...@@ -773,7 +773,7 @@ int main(int argc, char** argv)
/* We perform the execve(2) after all the cleanup is done. */ /* We perform the execve(2) after all the cleanup is done. */
if (exec_argv) if (exec_argv)
{ {
execv(exec_argv[0], exec_argv); execvp(exec_argv[0], exec_argv);
argo_exit(EXIT_FAILURE, "Command execution failed", errno); argo_exit(EXIT_FAILURE, "Command execution failed", errno);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment