On 16/02/07, Amos Shapira <[EMAIL PROTECTED]> wrote:

Hi,

I'm trying to help complete Shachar Shemesh' privbind project (
http://sourceforge.net/projects/privbind) and it mostly works except that
when the writing side of the socketpair exits, the side which calls
"recvfrom" keeps waiting for messages.


Digging a bit more in the kernel source I see that since the SOCK_DGRAM
sockets are not connected, closing one side won't bother to inform the other
side about the shutdown. Switching to SOCK_SEQPACKET solved the problem.

This means that privbind will depend on kernel 2.6.4 or above.

Another option (to keep privbind more portable) is to try to move to stream
sockets and implement message boundaries at the application level...

Cheers,

--Amos

Reply via email to