off course they are not, they are UDP.

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

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




--
Udi Shamir,
Linux System Developer.
http://sf.net/projects/em-module
http://www.linkedin/in/udishamir
+972-2-8544839

Reply via email to