[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#56317: problems with console windows

Erik Andersen wrote:
> On Sun Aug 06, 2000 at 08:52:45PM +0200, Martin Schulze wrote:
> > > Platform: VMWare 1.1.2 (linux)
> > > Stage: 'configure modules'.
> > 
> > > I selected category 'net' (please wait dialog appeared) and changed my tty
> > > to tty2. after detecting modules new dialog window (select net modules)
> > > appeared in tty2 not in tty1.
> > 
> > Adam, are you sure that this is not a result of tty-manipulations
> > done by the installer?  I lighly recall some other problems with
> > tty's in connection with our installer.
> > 
> > If it is not in the installer, it is in whiptail or somewhere
> > else, since modconf simply uses whiptail and does no tty-manipulations
> > or uses /dev/tty directly.
> Actually, I suspect this is due to the way busybox is running 
> things.  In /etc/inittab it is set to:
> 	# main setup program
> 	::respawn:/sbin/dbootstrap
> which means that dbootstrap is being run on /dev/console.  When folks change
> ttys, /dev/console changes to point to the currently active tty.  So if
> dbootstrap tries to print stuff wile folks have changed vts, well, it goes
> right out onto whatever the current tty is.
> It is important that dbootstrap run on /dev/console, so it can work as well on
> serial consoles as it does on regualar virtual consoles.  So the only way to
> solve this is that dbootstrap needs some code added to to detect what the
> underlying console device _really_ is (as seen in busybox init.c
> console_init()) and use that instead -- doing something like this:
>     terminal=NULL;
>     find_real_console_device(terminal);
>     if ((fd = open(terminal, O_RDWR)) < 0) {
> 	dup2(fd, 0);
> 	dup2(fd, 1);
> 	dup2(fd, 2);
>     }

That's at least a good explanation.

If you get me some ideas for implementing find_real_console_device()
I'd happy to go ahead.  Just dump me a couple of routines whose
manpage I'll have to consult.  I haven't done any tty-lowlevel stuff



This is Linux Country.  On a quiet night, you can hear Windows reboot.

Please always Cc to me when replying to me on the lists.

Reply to: