Subject: Re: fixing send(2) semantics (kern/29750)
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 03/27/2005 08:38:39
On Mar 27, 2005, at 12:48 AM, Jonathan Stone wrote:
> My quick reading of the SUSve spec for send(2) is that it talks only
> about what happens between userspace and the socket layer. What
> happens below that is up to the protocol. Which leads us to:
SUSv3 also makes the same distinction between EAGAIN and ENOBUFS.
EAGAIN is required only of the operation would have blocked. Seems
like we're in a situation where the places that can return ENOBUFS
were never intended to be blocking points, so the return value is
perfectly legal according to the standard.
I'm not even sure my suggestion of translation ENOBUFS -> 0 is
actually necessary now.
-- thorpej