From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22591 invoked from network); 6 Apr 2009 09:11:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Apr 2009 09:11:12 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 40618 invoked from network); 6 Apr 2009 09:11:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Apr 2009 09:11:08 -0000 Received: (qmail 8980 invoked by alias); 6 Apr 2009 09:11:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26812 Received: (qmail 8965 invoked from network); 6 Apr 2009 09:11:03 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 Apr 2009 09:11:03 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 914E682D4B6A for ; Mon, 6 Apr 2009 11:11:00 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly06d.srv.mailcontrol.com (MailControl) with ESMTP id n369ANno028123 for ; Mon, 6 Apr 2009 10:10:57 +0100 Received: from news01 ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 6 Apr 2009 10:10:55 +0100 Date: Mon, 6 Apr 2009 10:10:55 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: tcp_read -d and newlines Message-ID: <20090406101055.60f16ce1@news01> In-Reply-To: <20090406095901.297232b0@news01> References: <20090405231036.GA13802@scru.org> <20090406095901.297232b0@news01> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Apr 2009 09:10:55.0329 (UTC) FILETIME=[97686D10:01C9B697] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.68.0.116 X-Virus-Scanned: ClamAV 0.92.1/9206/Sun Apr 5 20:23:11 2009 on bifrost X-Virus-Status: Clean On Mon, 6 Apr 2009 09:59:01 +0100 Peter Stephenson wrote: > On Sun, 5 Apr 2009 23:10:36 +0000 > Clint Adams wrote: > > When tcp_read -d'ing a socket that doesn't end in a newline, the last > > "line" gets discarded, I think, because read returns an error on that > > line. > > I've had problems with this, too, in the past, although I think my problem > was chunks of input (not necessarily ending in EOF) that didn't have > newlines. I could find an easy way of handling this. \ n't, sorry. Probably obvious from the context but I thought I'd better correct it. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070