* exceptions.cc (signal_exit): Reset all mutos owned by the main thread.

* fhandler.h: Define *_output_mutex macros for serializing tty output.
(fhandler_termios): Remove restart_output_event.  Define dummy output mutex
methods.
(fhandler_pty_master): Remove unneeded fixup_after_fork method.
* fhandler_termios.cc (fhandler_termios::line_edit): Acquire output_mutex when
CTRL-S is hit.  Release it on CTRL-Q.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Remove
inappropriate OutputStopped test here.  Just use the output mutex.
(fhandler_pty_master::fhandler_pty_master): Remove obsolete reference to
restart_output_event.
(fhandler_tty_common::close): Ditto.
(fhandler_pty_master::set_close_on_exec): Ditto.
(fhandler_pty_master::fixup_after_fork): Delete.
* tty.cc (tty::common_init): Ditto.
* sync.cc (muto::reset): New method.
* sync.h: Declare above method.
This commit is contained in:
Christopher Faylor
2000-09-07 01:18:37 +00:00
parent 8dec7b0379
commit c1644acb23
8 changed files with 55 additions and 32 deletions

View File

@ -213,14 +213,18 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
{
if (c == tc->ti.c_cc[VSTOP])
{
tc->OutputStopped++;
if (!tc->OutputStopped)
{
tc->OutputStopped = 1;
acquire_output_mutex (INFINITE);
}
continue;
}
else if (c == tc->ti.c_cc[VSTART])
{
restart_output:
tc->OutputStopped = 0;
SetEvent (restart_output_event);
release_output_mutex ();
continue;
}
else if ((tc->ti.c_iflag & IXANY) && tc->OutputStopped)