Fix internal uses of _PATH_BSHELL.
We regressed on this recently: code under the upstream-* directories has
_PATH_BSHELL defined as a call to __bionic_get_shell_path(). In our own
code, we may as well just call it directly.
Bug: https://issuetracker.google.com/129030706
Test: ran tests
Change-Id: Ic2423f521272be95e67f94771772fe8072636ef0
diff --git a/libc/bionic/exec.cpp b/libc/bionic/exec.cpp
index 1cf3a58..3309585 100644
--- a/libc/bionic/exec.cpp
+++ b/libc/bionic/exec.cpp
@@ -39,6 +39,7 @@
#include <string.h>
#include <unistd.h>
+#include "private/__bionic_get_shell_path.h"
#include "private/FdPath.h"
extern "C" char** environ;
@@ -111,7 +112,7 @@
script_argv[0] = "sh";
script_argv[1] = buf;
memcpy(script_argv + 2, argv + 1, arg_count * sizeof(char*));
- return execve(_PATH_BSHELL, const_cast<char**>(script_argv), envp);
+ return execve(__bionic_get_shell_path(), const_cast<char**>(script_argv), envp);
}
int execvpe(const char* name, char* const* argv, char* const* envp) {