From 75d8660d99f1b5b5da471569955ffce9a27e8702 Mon Sep 17 00:00:00 2001 From: Ubaldo Porcheddu Date: Sat, 20 Feb 2016 22:18:37 +0000 Subject: Replaced any occurence of /bin/sh with _PATH_BSHELL to allow easier portability on system with default shell on a different directory, like for instance on android. Signed-off-by: Ubaldo Porcheddu --- libc/stdio/popen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/stdio') diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c index e1b1d4038..1efbd3b7a 100644 --- a/libc/stdio/popen.c +++ b/libc/stdio/popen.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -91,7 +92,7 @@ FILE *popen(const char *command, const char *modes) close(po->f->__filedes); } - execl("/bin/sh", "sh", "-c", command, (char *)0); + execl(_PATH_BSHELL, "sh", "-c", command, (char *)0); /* SUSv3 mandates an exit code of 127 for the child if the * command interpreter can not be invoked. */ -- cgit v1.2.3