aboutsummaryrefslogtreecommitdiff
path: root/shell/Config.src
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-07-16 17:16:40 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-16 17:16:40 +0200
commit51ca7761a3579f3c3f7e771b39019e6e248a5171 (patch)
tree04621b8f401e5a478070e633fb2c086c05c99695 /shell/Config.src
parent5d26df6497505e8ed486bf3e3ba65d0d6f0daa15 (diff)
downloadbusybox-w32-51ca7761a3579f3c3f7e771b39019e6e248a5171.tar.gz
busybox-w32-51ca7761a3579f3c3f7e771b39019e6e248a5171.tar.bz2
busybox-w32-51ca7761a3579f3c3f7e771b39019e6e248a5171.zip
cttyhack: move build system bits into cttyhack.c, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/Config.src')
-rw-r--r--shell/Config.src36
1 files changed, 0 insertions, 36 deletions
diff --git a/shell/Config.src b/shell/Config.src
index 6389d943a..f6f0b6c94 100644
--- a/shell/Config.src
+++ b/shell/Config.src
@@ -158,40 +158,4 @@ config FEATURE_SH_NOFORK
158 158
159 This feature is relatively new. Use with care. 159 This feature is relatively new. Use with care.
160 160
161config CTTYHACK
162 bool "cttyhack"
163 default y
164 help
165 One common problem reported on the mailing list is "can't access tty;
166 job control turned off" error message which typically appears when
167 one tries to use shell with stdin/stdout opened to /dev/console.
168 This device is special - it cannot be a controlling tty.
169
170 Proper solution is to use correct device instead of /dev/console.
171
172 cttyhack provides "quick and dirty" solution to this problem.
173 It analyzes stdin with various ioctls, trying to determine whether
174 it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
175 If it detects one, it closes stdin/out/err and reopens that device.
176 Then it executes given program. Opening the device will make
177 that device a controlling tty. This may require cttyhack
178 to be a session leader.
179
180 Example for /etc/inittab (for busybox init):
181
182 ::respawn:/bin/cttyhack /bin/sh
183
184 Starting an interactive shell from boot shell script:
185
186 setsid cttyhack sh
187
188 Giving controlling tty to shell running with PID 1:
189
190 # exec cttyhack sh
191
192 Without cttyhack, you need to know exact tty name,
193 and do something like this:
194
195 # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
196
197endmenu 161endmenu