Skip to content

errno ignored for unix getaddrinfo #36546

Description

@jwilm

When getaddrinfo() fails, the wrapper produces a custom io::Error using gai_strerror(). There's one variant which essentially says just look at errno.

EAI_SYSTEM    system error returned in errno

But libstd doesn't do that which leads to very unhelpful errors.

Io(Error { repr: Custom(Custom { kind: Other, error: StringError("failed to lookup address information: System error") }) }))

It would be great if the error value could be checked for EAI_SYSTEM, provide the strerror() message in the StringError value, and set Kind appropriately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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