Split out tty and shared_info stuff into their own headers and use throughout.
Include sys/termios.h for files which need it. * tty.h: New file. * shared_info.h: New file. * fhandler.h: Move inline methods that rely on tty stuff to fhandler_console.cc. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set output_done_event immediately after reading data to speed up tty output processing. (process_output): Set write_error to errno or zero. (fhandler_tty_slave::write): Check previous write error prior to writing to slave end of pipe. This allows tty output to be slightly less synchronous. * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from fhandler.h. (fhandler_console::set_input_state): Ditto.
This commit is contained in:
@ -24,6 +24,8 @@ details. */
|
||||
#include "sync.h"
|
||||
#include "sigproc.h"
|
||||
#include "pinfo.h"
|
||||
#include "tty.h"
|
||||
#include "shared_info.h"
|
||||
|
||||
/*
|
||||
* Scroll the screen context.
|
||||
@ -249,6 +251,21 @@ fhandler_console::read (void *pv, size_t buflen)
|
||||
return copied_chars;
|
||||
}
|
||||
|
||||
int
|
||||
fhandler_console::tcsetpgrp (pid_t pid)
|
||||
{
|
||||
tc->pgid = pid;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_console::set_input_state ()
|
||||
{
|
||||
if (TTYISSETF (RSTCONS))
|
||||
input_tcsetattr (0, &tc->ti);
|
||||
}
|
||||
|
||||
|
||||
static struct
|
||||
{
|
||||
SHORT winTop;
|
||||
|
Reference in New Issue
Block a user