* fhandler.h (fhandler_termios::tcinit): Make second argument non-optional.

* fhandler_console.cc (fhandler_console::open): Specify second argument to
tcinit.
* fhandler_termios.cc (fhandler_termios::tcinit): Rename second argument.  Set
pgid to 0 if this is a pty master.
(fhandler_termios::tcgetpgrp): Just return value of pgid.  It will be zero if
not initialized.
* fhandler_tty.cc (fhandler_tty_slave::open): Specify second argument to
tcinit.
(fhandler_tty_slave::ioctl): Implement TIOCGPRP/TIOCSPGRP.  Fix switch
indentation.
(fhandler_tty_master::ioctl): Implement TIOCGPRP/TIOCSPGRP.
* include/sys/termios.h (TIOCGPGRP): Define similarly to Linux.
* include/sys/termios.h (TIOCSPGRP): Ditto.
This commit is contained in:
Christopher Faylor
2010-10-23 18:07:08 +00:00
parent 2e859e0759
commit 4ce975efd3
6 changed files with 68 additions and 27 deletions

View File

@ -885,7 +885,7 @@ class fhandler_termios: public fhandler_base
HANDLE& get_output_handle () { return output_handle; }
line_edit_status line_edit (const char *rptr, int nread, termios&);
void set_output_handle (HANDLE h) { output_handle = h; }
void tcinit (tty_min *this_tc, bool force = false);
void tcinit (tty_min *this_tc, bool force);
bool is_tty () const { return true; }
int tcgetpgrp ();
int tcsetpgrp (int pid);