From 886370c2402e6fcf6ac613a8603f99fff66cd20c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 21 Mar 2019 21:11:41 -0700 Subject: 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 --- libc/stdio/stdio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/stdio/stdio.cpp') 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); } -- cgit v1.2.3