Proposal: Fix abstract unix sockets (#1699)

Lennart Kolmodin kolmodin at dtek.chalmers.se
Sun Sep 16 05:16:40 EDT 2007


Hi,

I've added proposal #1699 to fix abstract unix sockets on Linux for the
network library.

The patch is so far only tested under Linux (2.6.15), but should not
affect Windows or other OSes which does not have AUS.

>From the darcs patch comment:

Abstract Unix Socket paths begin with a zero, are not zero terminated
and needs accurate socklen calculation. Thus this patch, on linux:

 * Calculates the exact size of sockaddr.
 * Pokes sockaddr correctly wrt aus.

Also, due to much more socklen usage:
 * Switch Network.Socket to use CSockLen instead of CInt.
 * Cleanup surrounding code.

Cheers,
  Lennart Kolmodin

-- 
"The only thing that interferes with my learning is my education."
        -- Albert Einstein


More information about the Libraries mailing list