* fhandler_termios.cc (fhandler_termios::line_edit): Don't manipulate
output_mutex on CTRL-S/CTRL-Q to avoid a deadlock. * fhandler_tty.cc (fhandler_pty_slave::write): Loop when output_stopped is detected before acquiring output_mutex. Acquire output_mutex in the loop for each write. * tty.h: Remove some obsolete defines. (tty_min::output_stopped): Make 'bool'.
This commit is contained in:
@@ -286,17 +286,13 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
|
||||
if (CCEQ (ti.c_cc[VSTOP], c))
|
||||
{
|
||||
if (!tc ()->output_stopped)
|
||||
{
|
||||
tc ()->output_stopped = 1;
|
||||
acquire_output_mutex (INFINITE);
|
||||
}
|
||||
tc ()->output_stopped = true;
|
||||
continue;
|
||||
}
|
||||
else if (CCEQ (ti.c_cc[VSTART], c))
|
||||
{
|
||||
restart_output:
|
||||
tc ()->output_stopped = 0;
|
||||
release_output_mutex ();
|
||||
tc ()->output_stopped = false;
|
||||
continue;
|
||||
}
|
||||
else if ((ti.c_iflag & IXANY) && tc ()->output_stopped)
|
||||
|
Reference in New Issue
Block a user