Messages in this thread | | | Date | Tue, 15 Feb 2005 11:08:07 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: Pty is losing bytes |
| |
On Tue, 15 Feb 2005, Andreas Schwab wrote: > > Recent kernel are losing bytes on a pty.
Great catch.
I think it may be a n_tty line discipline bug, brought on by the fact that the PTY buffering is now 4kB rather than 2kB. 4kB is also the N_TTY_BUF_SIZE, and if n_tty has some off-by-one error, that would explain it.
Does the problem go away if you change the default value of "chunk" (in drivers/char/tty_io.c:do_tty_write) from 4096 to 2048? If so, that means that the pty code has _claimed_ to have written 4kB, and only ever wrote 4kB-1 bytes. That in turn implies that "ldisc.receive_room()" disagrees with "ldisc.receive_buf()".
Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |