Subject: Re: unix domain datagram socket buffering bug?
To: Matt Thomas <matt@3am-software.com>
From: Gary Duzan <gary@duzan.org>
List: tech-kern
Date: 04/10/2003 22:28:52
In Message <5.1.1.6.2.20030410102609.03472a50@3am-software.com> ,
   Matt Thomas <matt@3am-software.com> wrote:

=>At 09:05 AM 4/10/2003, David Laight wrote:
=>>On Thu, Apr 10, 2003 at 09:02:59AM -0700, Jesse Off wrote:
=>> > When the receive buffer fills in one socket from a
=>> > socketpair(PF_LOCAL, SOCK_DGRAM), I've noticed that
=>> > subsequent write()s to the other socket will fail with
=>> > EINVAL.
=>>
=>>I would expect it to block, unless O_NONBLOCK is set
=>>in which case it should return EAGAIN.
=>
=>I'd never would have expected socketpair to work with
=>SOCK_DGRAM.

   I've done that before (though on AIX) when I wanted a pipe-like
behavior, but preserving datagram boundaries. It saved me from
having to wrap my own framing protocol, and it Just Worked.

					Gary Duzan