aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-21 00:41:04 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-21 00:41:04 +0000
commitbb21944ea0d5e95f07691dfaeaba404ddfa70528 (patch)
tree3e82c2dd94d674a723f3d7df350f32dc8892adc1 /shell
parentff978c7d73d84e06ee5dc927a180cdc794d35b21 (diff)
downloadbusybox-w32-bb21944ea0d5e95f07691dfaeaba404ddfa70528.tar.gz
busybox-w32-bb21944ea0d5e95f07691dfaeaba404ddfa70528.tar.bz2
busybox-w32-bb21944ea0d5e95f07691dfaeaba404ddfa70528.zip
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> git-svn-id: svn://busybox.net/trunk/busybox@17426 69ca8d6d-28ef-0310-b511-8ec308f3f277
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)
6528 int ofd; 6528 int ofd;
6529 ofd = fd = open(_PATH_TTY, O_RDWR); 6529 ofd = fd = open(_PATH_TTY, O_RDWR);
6530 if (fd < 0) { 6530 if (fd < 0) {
6531 /* BTW, bash will try to open(ttyname(0)) if open("/dev/tty") fails.
6532 * That sometimes helps to acquire controlling tty.
6533 * Obviously, a workaround for bugs when someone
6534 * failed to provide a controlling tty to bash! :) */
6531 fd += 3; 6535 fd += 3;
6532 while (!isatty(fd) && --fd >= 0) 6536 while (!isatty(fd) && --fd >= 0)
6533 ; 6537 ;