Re: Pty is losing bytes

Andreas Schwab
2005-02-15T20:36:04Z

Linus Torvalds <torvalds@osdl.org> writes:

> 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.

I've also seen more than one byte missing. For example when sending a big
chunk of bytes down the pty via an Emacs *shell* buffer up to 16 bytes are
missing somewhere in the middle.

> 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?

Yes, that helps.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."