lkml.org 
[lkml]   [2005]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.081 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site