Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2002 17:30:51 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        David Greenman <dg@root.com>
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>
In-Reply-To: <20020122140113.A52101@nexus.root.com>; from dg@root.com on Tue, Jan 22, 2002 at 02:01:13PM -0800
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>

next in thread | previous in thread | raw e-mail | index | archive | help
* David Greenman <dg@root.com> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020122173051.H13686>