On Tuesday 06 February 2007 21:11, David Schwartz wrote:
> > Why not improve consistency and make unix_dgram_recvmsg() return the
> > full packet length? So it would behave as UDP does. What do you think
> > about adding the following code to linux/net/unix/af_unix.c:
>
> It would be nice if the world worked that way, but you can't break
> POSIX compliance. Perhaps another receive flag?

I now understand that setting the MSG_TRUNC flag is only applicable for 
PF_PACKET. I do not argue about that any more. :-)

What I question is the return value when receiving from a local socket 
using recv(). Sorry, I don't know what the POSIX standard has to say 
about receiving from local sockets in contrast to UDP sockets as my only 
reference are the man pages.

According to "man 2 recv", on success the return value is the "the  number  
of bytes received". Since patch-2.6.8, UDP is always returning the full 
packet length. I'd like to see local sockets (PF_UNIX) to do the same. 

Does POSIX stipulate a different behaviour for local sockets?

Cheers
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to