[BusyBox] More init questions.

Rob Landley rob at landley.net
Mon Jul 5 11:51:22 UTC 2004


Okay, I understand about a controlling tty, and I understand that each session 
group can have at most one controlling tty.

However, the need to "steal back" the controlling tty from a terminated 
process is a bit funky.  (The current busybox "run()" code is a bit odd, to 
say the least, but this bit of it's particularly odd.)  Presumably, this is 
something that isn't done simply by starting a new getty on the appropriate 
terminal?  (I looked at getty.c, and it's calling the same ioctl...)

This code triggers when the process that forks exited, but only if we waited 
for that process to exit, not if it ran asynchronously.  We call the ioctl to 
associate the tty with a process that's about to exit, because previously the 
tty was associated with a process that just exited?

Presumably, the tty might be associated with a child process of the one that 
just exited.  But until we fire up a new process on that terminal, why 
exactly do we care?  (Can we not open it again until we've done this?  I can 
go 'echo "boing" >> /dev/tty2' from the command line just fine...)

What exactly is the point of this "stealing the tty back" thing again?  Why is 
this init's job?

Rob
-- 
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas.  (I'm the con chair.)




More information about the busybox mailing list