Question about init and controlling TTY

John Z. Bohach jzb at aexorsyst.com
Mon Apr 10 14:39:25 UTC 2006


On Sunday 09 April 2006 23:27, David Seikel wrote:
> On Sun, 9 Apr 2006 21:28:04 -0500 Rob Landley <rob at landley.net> wrote:
> > your use case of where this hit you (you want the login prompt to
> > come up _while_ your init scripts are still writing to the console)
> > doesn't strike me as being generally applicable: you can't have two
> > programs with the same active controlling tty at the same time.  I'm
> > still a little fuzzy on what behavior you _want_ there.
> >
> > If somebody would like to weigh in with a second opinion here I'm all
> > ears, but it seems that turning "-" to _not_ grab the tty sounds like
> > a more reasonable move?  If nobody's ever noticed this was broken
> > before now, it doesn't sound that heavily used?
>
> In urunlevel I have the init scripts operating an a different tty,
> leaving the first tty free for the login.  I also prefer to have the
> login prompt independent of the init scripts, so that the user doesn't
> have to wait for all those scripts to run before being able to login.
>
> I never noticed any problem with the way I did things.

And you won't have any problems that way.  The reason is because a
terminal is a CTTY of only one session.  But you use two different terminals,
so each can be the CTTY of its own session.  But if you only have one
terminal available, such as /dev/ttyS0, and tried to run both sessions
there, you'd have the same problem as Devin.




More information about the busybox mailing list