From owner-cvs-all Tue Oct 29 19:32:37 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AF3037B401; Tue, 29 Oct 2002 19:32:36 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id B50FB43E75; Tue, 29 Oct 2002 19:32:35 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 0E3BD534E; Wed, 30 Oct 2002 04:32:34 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bill Fenner Cc: jhb@FreeBSD.org, obrien@FreeBSD.org, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/lib/libfetch common.c References: <200210291758.JAA06540@windsor.research.att.com> From: Dag-Erling Smorgrav Date: Wed, 30 Oct 2002 04:32:33 +0100 In-Reply-To: <200210291758.JAA06540@windsor.research.att.com> (Bill Fenner's message of "Tue, 29 Oct 2002 09:58:41 -0800") Message-ID: Lines: 14 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386--freebsd) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bill Fenner writes: > I don't understand why _fetch_read() is never supposed to return > zero. _fetch_read() *has* to return zero to stdio to indicate > EOF. Because in my mental reckoning I stupidly left out the simplest (increasingly infrequent but still common) case of an FTP transfer, or an unchunked HTTP transfer, of a file whose size is not known in advance. In all other cases, a 0-length read indicates a dropped connection. I failed to allow for the case where it doesn't. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message