Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261836AbVBOTIN (ORCPT ); Tue, 15 Feb 2005 14:08:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261838AbVBOTIN (ORCPT ); Tue, 15 Feb 2005 14:08:13 -0500 Received: from fire.osdl.org ([65.172.181.4]:32228 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S261836AbVBOTII (ORCPT ); Tue, 15 Feb 2005 14:08:08 -0500 Date: Tue, 15 Feb 2005 11:08:07 -0800 (PST) From: Linus Torvalds To: Andreas Schwab cc: linux-kernel@vger.kernel.org Subject: Re: Pty is losing bytes In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 899 Lines: 25 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/