From owner-cvs-all Tue Jan 22 17:30:56 2002 Delivered-To: cvs-all@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 6D69537B41A; Tue, 22 Jan 2002 17:30:52 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 8305C10DDF8; Tue, 22 Jan 2002 17:30:51 -0800 (PST) Date: Tue, 22 Jan 2002 17:30:51 -0800 From: Alfred Perlstein To: David Greenman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_syscalls.c Message-ID: <20020122173051.H13686@elvis.mu.org> References: <200201221732.g0MHWAR50160@freefall.freebsd.org> <20020122104431.X13686@elvis.mu.org> <20020122120048.B50580@nexus.root.com> <20020122124129.E13686@elvis.mu.org> <20020122140113.A52101@nexus.root.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020122140113.A52101@nexus.root.com>; from dg@root.com on Tue, Jan 22, 2002 at 02:01:13PM -0800 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 * David Greenman [020122 14:14] wrote: > > > >AH! I didn't consider this... but... did it block while sending > >the entire file... or when sending the trailers? :) > > It doesn't matter where it would have blocked. All the application cares > about is if it is done with everything. > > >It seems like returning EAGAIN is correct, but the application would > >need to stat(2) the file to find out at that point if utilizing > >trailers? > > No. It doesn't need to know that. Ok, maybe I'm being dense, but... you input: 100 bytes of trailers, 200 byte file and 100 bytes of trailers, nbytes is 0. you get back: ret = -1, errno = EAGAIN, sbytes = 150 since you never stat(2)'d the file to begin with (to get the size) how do you know what to do now without stat(2)'ing it now? Not that this is a problem, but I'm curious as to how you would avoid it. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message