* fhandler_tty.cc (fhandler_tty_master::init): Set initial size of tty to that

of console in which tty is operating.
(process_input): Semi-revert previous change.  Need to just use current
terminfo settings since this function is running in a thread, blocked when the
terminfo changes.
This commit is contained in:
Christopher Faylor 2002-12-27 03:54:59 +00:00
parent 740c81ed4e
commit 3bfed277d6
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2002-12-26 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_master::init): Set initial size of tty
to that of console in which tty is operating.
(process_input): Semi-revert previous change. Need to just use current
terminfo settings since this function is running in a thread, blocked
when the terminfo changes.
2002-12-24 Andreas Schwab <schwab@suse.de> 2002-12-24 Andreas Schwab <schwab@suse.de>
* Makefile.tpl (multilib.out): Fix missing space. * Makefile.tpl (multilib.out): Fix missing space.

View File

@ -54,6 +54,9 @@ fhandler_tty_master::init (int ntty)
termios ti; termios ti;
memset (&ti, 0, sizeof (ti)); memset (&ti, 0, sizeof (ti));
console->tcsetattr (0, &ti); console->tcsetattr (0, &ti);
winsize w;
console->ioctl (TIOCGWINSZ, &w);
this->ioctl (TIOCSWINSZ, &w);
ttynum = ntty; ttynum = ntty;
@ -198,9 +201,8 @@ process_input (void *)
while (1) while (1)
{ {
size_t nraw = INP_BUFFER_SIZE; size_t nraw = INP_BUFFER_SIZE;
termios ti = tty_master->get_ttyp ()->ti;
tty_master->console->read ((void *) rawbuf, nraw); tty_master->console->read ((void *) rawbuf, nraw);
(void) tty_master->line_edit (rawbuf, nraw, ti); (void) tty_master->line_edit (rawbuf, nraw, tty_master->get_ttyp ()->ti);
} }
} }