bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passfd on more platforms


From: Paolo Bonzini
Subject: Re: passfd on more platforms
Date: Mon, 14 Mar 2011 15:39:41 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 03/14/2011 03:02 PM, Bastien ROUCARIES wrote:
>
>      recv(socket, buf, 512) =>  return 17, buf = "getfd\n0x12345678\0"
>      parse getfd
>      recvfd fails, or even worse it blocks (possibly forever)
>      even if recvfd doesn't block, parsing 0x12345678\0 fails
Why ? It is like sending and receiving data throught a protocol. i
will emulate AF_UNIX by tcp socket over localhost with TCP_NODELAY

No, that's exactly the _wrong_ reason for TCP_NODELAY. You simply cannot expect message boundaries to be respected when using SOCK_STREAM.

So, either sendfd/recvfd must be documented to work only on SOCK_DGRAM sockets, or they have to be rethought (if possible at all).

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]