summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko2010-05-15 20:43:07 +0200
committerDenys Vlasenko2010-05-15 20:43:07 +0200
commitb367bb2a620d3c349b0a61b949a6ebca32bf5395 (patch)
treee6871fac55abaae0e388e5351adc0df3081db55f /shell
parentc84c85ae345f6b3a4ba74ae1ab22acddd41fa456 (diff)
downloadbusybox-b367bb2a620d3c349b0a61b949a6ebca32bf5395.zip
busybox-b367bb2a620d3c349b0a61b949a6ebca32bf5395.tar.gz
cttyhack: document the need to setsid
function old new delta packed_usage 26988 27057 +69 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/Config.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/shell/Config.in b/shell/Config.in
index 3b16506..36a9317 100644
--- a/shell/Config.in
+++ b/shell/Config.in
@@ -354,9 +354,20 @@ config CTTYHACK
It analyzes stdin with various ioctls, trying to determine whether
it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
If it detects one, it closes stdin/out/err and reopens that device.
- Then it executes given program. Usage example for /etc/inittab
- (for busybox init):
+ Then it executes given program. Opening the device will make
+ that device a controlling tty. This may require cttyhack
+ to be a session leader.
+
+ Example for /etc/inittab (for busybox init):
::respawn:/bin/cttyhack /bin/sh
+ Giving controlling tty to shell running with PID 1:
+
+ $ exec cttyhack sh
+
+ Starting an interative shell from boot shell script:
+
+ setsid cttyhack sh
+
endmenu