Subject: Re: unix domain datagram socket buffering bug?
To: Matt Thomas <firstname.lastname@example.org>
From: Gary Duzan <email@example.com>
Date: 04/10/2003 22:28:52
In Message <firstname.lastname@example.org> ,
Matt Thomas <email@example.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
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.