aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2019-01-13 03:25:51 +0200
committermosimchah <mosimchah@gmail.com>2019-04-17 07:49:37 -0400
commit85ba804f356926145c9c3420c3fd08d4bc078b4a (patch)
tree9fdb91ade242c1a4d9058c76496348ad468a837d
parentdcf3525f3df609c08017aa951099431abc2d7572 (diff)
Revert "bionic: Let popen and system fall back to /sbin/sh"
* A better solution exists now This reverts commit 7caf61f4e86670d71dea8631163b5060b9ee68c4. Change-Id: Iac5189af6bb687cc0c5f66e7d688e551b4403bbc
-rw-r--r--libc/include/paths.h1
-rw-r--r--libc/upstream-netbsd/lib/libc/gen/popen.c2
-rw-r--r--libc/upstream-openbsd/lib/libc/stdlib/system.c2
3 files changed, 0 insertions, 5 deletions
diff --git a/libc/include/paths.h b/libc/include/paths.h
index a90c9b976..d2c5956a8 100644
--- a/libc/include/paths.h
+++ b/libc/include/paths.h
@@ -37,7 +37,6 @@
#ifndef _PATH_BSHELL
#define _PATH_BSHELL "/system/bin/sh"
#endif
-#define _PATH_BSHELL2 "/sbin/sh"
#define _PATH_CONSOLE "/dev/console"
#define _PATH_DEFPATH "/sbin:/system/sbin:/system/bin:/system/xbin:/vendor/bin:/vendor/xbin"
#define _PATH_DEV "/dev/"
diff --git a/libc/upstream-netbsd/lib/libc/gen/popen.c b/libc/upstream-netbsd/lib/libc/gen/popen.c
index b6ce47c5d..593e34631 100644
--- a/libc/upstream-netbsd/lib/libc/gen/popen.c
+++ b/libc/upstream-netbsd/lib/libc/gen/popen.c
@@ -152,8 +152,6 @@ popen(const char *command, const char *type)
}
execl(_PATH_BSHELL, "sh", "-c", command, NULL);
- if (errno == ENOENT)
- execl(_PATH_BSHELL2, "sh", "-c", command, NULL);
_exit(127);
/* NOTREACHED */
}
diff --git a/libc/upstream-openbsd/lib/libc/stdlib/system.c b/libc/upstream-openbsd/lib/libc/stdlib/system.c
index b609554db..de32d4328 100644
--- a/libc/upstream-openbsd/lib/libc/stdlib/system.c
+++ b/libc/upstream-openbsd/lib/libc/stdlib/system.c
@@ -62,8 +62,6 @@ system(const char *command)
case 0: /* child */
sigprocmask(SIG_SETMASK, &omask, NULL);
execve(_PATH_BSHELL, argp, environ);
- if (errno == ENOENT)
- execve(_PATH_BSHELL2, argp, environ);
_exit(127);
}