aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-21 00:41:04 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-21 00:41:04 +0000
commit2f0c0d0b8829b8aea97bc09833e172c59b55cd94 (patch)
tree3e82c2dd94d674a723f3d7df350f32dc8892adc1 /shell
parentb3f3c23f786a2486a8545ef0d904061ac83e6453 (diff)
downloadbusybox-2f0c0d0b8829b8aea97bc09833e172c59b55cd94.tar.gz
Introduce FEATURE_EXEC_PREFER_APPLETS = "re-execute our own
executable if we asked to exec someting with argv[0] == known_applet" Use it in init. Also respect PATH in init, remove explicit "/sbin" etc from exec. Patch by Gabriel L. Somlo <somlo@cmu.edu>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 8ef8c465c..2db3302c7 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6528,6 +6528,10 @@ setjobctl(int on)
int ofd;
ofd = fd = open(_PATH_TTY, O_RDWR);
if (fd < 0) {
+ /* BTW, bash will try to open(ttyname(0)) if open("/dev/tty") fails.
+ * That sometimes helps to acquire controlling tty.
+ * Obviously, a workaround for bugs when someone
+ * failed to provide a controlling tty to bash! :) */
fd += 3;
while (!isatty(fd) && --fd >= 0)
;