Subject: Re: kern/21088: unix domain SOCK_DGRAM socketpair broken
To: None <jesseoff@yahoo.com>
From: Todd Vierling <tv@pobox.com>
List: netbsd-bugs
Date: 04/10/2003 16:11:50
On Thu, 10 Apr 2003 jesseoff@yahoo.com wrote:

:   socketpair(PF_LOCAL, SOCK_DGRAM, 0, sk);
:
:   while(ret != -1)
:     ret = write(sk[0], buf, 1024);

For portability, use send(2), not write(2), when performing datagram I/O.

(Although that's irrelevant to this PR; send(2) behaves the same way.  8-)

: The culprit seems to unp_output() in uipc_usrreq.c returning the EINVAL
: when the sbappendaddr() to the buddy socket's receive buffer returns 0.

Yes.  ENOBUFS would be more appropriate, and is in fact documented to be for
cases just like this in send(2).

-- 
-- Todd Vierling <tv@pobox.com>