Re: xterm loses data (pty regression)

From: Artur Skawina
Date: Mon Aug 10 2009 - 15:08:39 EST


Linus Torvalds wrote:
>
>> (Do ^S/^Q, see data loss)

> I think it's really this trivial.
>
> That pty commit removed the checking for tty->stopped in
> pty_write_buffer() for no clear reason. And when it did that, it broke all
> the pausing logic in drivers/char/n_tty.c.
>
> Can you confirm?

> static int pty_write_room(struct tty_struct *tty)
> {
> + if (tty->stopped)
> + return 0;
> return pty_space(tty->link);
> }

w/ this, the pty writes now block again after ^Q, and the data loss is gone.

Thanks,

artur
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/