From owner-freebsd-current@FreeBSD.ORG Sun Aug 2 13:02:10 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 033B2106566C for ; Sun, 2 Aug 2009 13:02:10 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id BE95E8FC1C for ; Sun, 2 Aug 2009 13:02:09 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.4] (adsl-154-218-245.ard.bellsouth.net [72.154.218.245]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n72Cok57081447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Aug 2009 08:50:47 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Ed Schouten In-Reply-To: <20090802123108.GY1292@hoeg.nl> References: <20090802105033.GG1884@deviant.kiev.zoral.com.ua> <20090802123108.GY1292@hoeg.nl> Content-Type: text/plain Organization: FreeBSD Date: Sun, 02 Aug 2009 07:50:41 -0500 Message-Id: <1249217441.1773.5.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: Kostik Belousov , FreeBSD Current Subject: Re: HEAD tty seems to drop characters X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 13:02:10 -0000 On Sun, 2009-08-02 at 14:31 +0200, Ed Schouten wrote: > Hi Kostik, > > * Kostik Belousov wrote: > > I run a screen(1), where I tried to copy large portion of output and > > paste it into vi. This resulted in the loss of the characters at random > > points inside the pasted text. > > I already took some time to investigate the issue. I have attached a > patch that should already improve the situation: > > - write() on a pseudo-terminal master also accounted the data that was > read into the kernel, but couldn't be passed to the TTY (which is > likely to happen in non-blocking mode). > > - There was also a small unrelated issue; input on a TTY which has been > configured in block (bypass) mode wouldn't set the input high water > mark. > > For some reason, the data loss doesn't occur when SSHing to myself > multiple times, but still causes screen(1) to drop some bytes later on. > > Even though it's always very easy to blame other applications, I suspect > this may be because I reduced the input buffer size from 8 KB to 2 KB > per pseudo-terminal. Maybe screen(1) can't deal with this. To be > investigated... I'm pretty sure that I've seen this without screen involved. Just trying to cut / paste pkg-plist entries from an xterm or gnome-terminal (IIRC, I tried both) into vi. It worked as long as I took smaller chunks, but corrupted things if I tried to copy the whole plist in one shot. robert. -- Robert Noland FreeBSD