[erlang-questions] unix domain sockets with abstract namespace: can't use all 108 bytes
Wed Mar 29 15:29:27 CEST 2017
On Wed, Mar 29, 2017 at 02:08:42PM +1300, Richard A. O'Keefe wrote:
> > On 28/03/2017, at 11:05 PM, Raimo Niskanen <raimo+erlang-questions@REDACTED> wrote:
> > I see no good way to know for all platforms if the address is supposed to
> > be zero terminated or not. Linux utilizes the special case that if the
> > first byte is zero then it is not zero terminated. I do not know if that
> > is a safe indicator on all platforms.
> The Linux manual page is quite specific:
> "a Unix domain socket can be bound to a >>>null-terminated<<<
> file system pathname"
> "an abstract socket address" begins with a NUL byte. "All of the
> remaining bytes define the 'name' of the socket." "The abstract
> socket namespace is a non-portable Linux extension."
> Sounds like any "fix" in Erlang's guts would need to be Linux-specific
> and leading NUL bytes should probably be reported as errors on other
That is uncomfortable since the spirit of configure tests is to test for
features and to not rely on a particular system name implying a feature.
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions