Skip to content

UNIXSocket#addr and UNIXSocket#path do not work on NetBSD (< 8) #45

Description

@tsahara
% mruby -e 'c = UNIXSocket.open("/tmp/foo"); p  c.addr'
trace:
        [0] -e:1
-e:1:invalid sockaddr (too short) (SocketError)

% mruby -e 'c = UNIXSocket.open("/tmp/foo"); p  c.path'
trace:
        [0] -e:1
-e:1:invalid sockaddr (too short) (SocketError)

That's because getsockname(unixsock) returns two-bytes sockaddr (is it a sockaddr?). See BUGS section of getsockname(2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions