diff options
author | Elliott Hughes <enh@google.com> | 2019-03-21 21:11:41 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2019-03-25 17:28:22 -0700 |
commit | 886370c2402e6fcf6ac613a8603f99fff66cd20c (patch) | |
tree | 55973f92a11704c20bc09aa8a74c2094c7b1c2a7 /libc/stdio | |
parent | ebdf4c19f9e034d7ec8e0e57539890d5c93eaed1 (diff) |
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
Diffstat (limited to 'libc/stdio')
-rw-r--r-- | libc/stdio/stdio.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index d7b69dcb5..d482a91c5 100644 --- a/libc/stdio/stdio.cpp +++ b/libc/stdio/stdio.cpp @@ -52,6 +52,7 @@ #include "local.h" #include "glue.h" +#include "private/__bionic_get_shell_path.h" #include "private/bionic_fortify.h" #include "private/ErrnoRestorer.h" #include "private/thread_private.h" @@ -1226,7 +1227,7 @@ FILE* popen(const char* cmd, const char* mode) { if (dup2(fds[child], desired_child_fd) == -1) _exit(127); close(fds[child]); if (bidirectional) dup2(STDOUT_FILENO, STDIN_FILENO); - execl(_PATH_BSHELL, "sh", "-c", cmd, nullptr); + execl(__bionic_get_shell_path(), "sh", "-c", cmd, nullptr); _exit(127); } |