summaryrefslogtreecommitdiff
path: root/libc/unistd/exec.c
diff options
context:
space:
mode:
authorUbaldo Porcheddu <ubaldo@eja.it>2016-02-20 22:18:37 +0000
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-02-24 22:17:10 +0100
commit75d8660d99f1b5b5da471569955ffce9a27e8702 (patch)
treefaa0f4bd0ff400c88fd77ee54f8fddafe30e3a2b /libc/unistd/exec.c
parente63d716d4b39402294a5f5fbb34e17e094f17748 (diff)
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 <ubaldo@eja.it>
Diffstat (limited to 'libc/unistd/exec.c')
-rw-r--r--libc/unistd/exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c
index 8fa42e586..9be856d4f 100644
--- a/libc/unistd/exec.c
+++ b/libc/unistd/exec.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <paths.h>
#include <string.h>
#include <errno.h>
#include <stdarg.h>
@@ -273,9 +274,9 @@ int execvpe(const char *path, char *const argv[], char *const envp[])
nargv[1] = (char *)path;
memcpy(nargv+2, argv+1, n*sizeof(char *));
#if defined (L_execvp)
- execve("/bin/sh", nargv, __environ);
+ execve(_PATH_BSHELL, nargv, __environ);
#elif defined (L_execvpe)
- execve("/bin/sh", nargv, envp);
+ execve(_PATH_BSHELL, nargv, envp);
#endif
EXEC_FREE(nargv, size2);
}