BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001342 [BusyBox] Other major always 05-09-07 01:20 02-12-08 02:23
Reporter zhuangyy View Status public  
Assigned To BusyBox
Priority normal Resolution no change required  
Status closed   Product Version 1.4.x
Summary 0001342: busybox 1.5.0 /bin/sh: can't access tty; job control turned off
Description after upgrading busybox from 1.4.2 to 1.5.0, I got a "/bin/sh: can't access tty; job control turned off" error message.

1.4.2 just works fine.

my inittab:
::sysinit:/etc/rc.sysinit
::respawn:-/bin/sh
::restart:/sbin/init
::shutdown:/bin/sync
Additional Information
Attached Files  cttyhack.c [^] (1,909 bytes) 05-09-07 13:12

- Relationships

- Notes
(0002348)
zhuangyy
05-09-07 01:21

the shell i am using is ash.
 
(0002349)
vda
05-09-07 13:12

init has stdin/out/err opened to /dev/console for it by kernel. This device is special - it cannot be a controlling tty.

There was special ad-hoc code in init which analyzed init's stdin with various ioctls, trying to determine whether it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). If it detected one, it closed stdin/out/err and reopened that device.

It was done in order to have controlling tty. Note that if console in NOT vc or serial, init was not able to do the trick. Thus different console devices were handled in different way.

This code ws removed. init just hands already opened /dev/console file descriptors to its children. If you wish to still do this hack, use attached program:

::respawn:/bin/cttyhack -/bin/sh
 
(0004174)
vda
02-12-08 02:23

Yet another user with shell on /dev/console...
 

- Issue History
Date Modified Username Field Change
05-09-07 01:20 zhuangyy New Issue
05-09-07 01:20 zhuangyy Status new => assigned
05-09-07 01:20 zhuangyy Assigned To  => BusyBox
05-09-07 01:21 zhuangyy Note Added: 0002348
05-09-07 13:12 vda Note Added: 0002349
05-09-07 13:12 vda File Added: cttyhack.c
02-12-08 02:23 vda Status assigned => closed
02-12-08 02:23 vda Note Added: 0004174
02-12-08 02:23 vda Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker