diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/Config.in | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/shell/Config.in b/shell/Config.in index 3b1650615..36a931715 100644 --- a/shell/Config.in +++ b/shell/Config.in | |||
@@ -354,9 +354,20 @@ config CTTYHACK | |||
354 | It analyzes stdin with various ioctls, trying to determine whether | 354 | It analyzes stdin with various ioctls, trying to determine whether |
355 | it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). | 355 | it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). |
356 | If it detects one, it closes stdin/out/err and reopens that device. | 356 | If it detects one, it closes stdin/out/err and reopens that device. |
357 | Then it executes given program. Usage example for /etc/inittab | 357 | Then it executes given program. Opening the device will make |
358 | (for busybox init): | 358 | that device a controlling tty. This may require cttyhack |
359 | to be a session leader. | ||
360 | |||
361 | Example for /etc/inittab (for busybox init): | ||
359 | 362 | ||
360 | ::respawn:/bin/cttyhack /bin/sh | 363 | ::respawn:/bin/cttyhack /bin/sh |
361 | 364 | ||
365 | Giving controlling tty to shell running with PID 1: | ||
366 | |||
367 | $ exec cttyhack sh | ||
368 | |||
369 | Starting an interative shell from boot shell script: | ||
370 | |||
371 | setsid cttyhack sh | ||
372 | |||
362 | endmenu | 373 | endmenu |