On Fri, 16 Feb 2007, Amos Shapira wrote:

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...

Use select on the socket and implement timeouts. Also set a flag in the SIGCHLD handler of the parent to notify the relevant part of the code to stop listening.

Peter

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to