[erlang-questions] unix domain sockets with abstract namespace: can't use all 108 bytes

Richard A. O'Keefe <>
Wed Apr 26 05:52:52 CEST 2017


> On 26/04/2017, at 2:14 AM, Raimo Niskanen <> wrote:
> 
> Well, it is just because on all other Unix-like OS:es the address is
> (loosly/de-facto) defined to be zero terminated, and there are macros to
> calculate the address structure size that use strlen on the string.

It's not *that* loose.  POSIX explicitly defines sun_path to hold a "pathname"
and a path name is defined as a character string and those are defined to be
NUL terminated.  (See <sys/un.h> and then check definitions for "path name"
and "string".)
> 
> Therefore the Linux way to use the address type contradicts the BSD:s and I
> guess Solaris.

And POSIX.  And HP-UX and AIX, as far as I can tell, and to the degree that
anyone cares.


More information about the erlang-questions mailing list