Skip to content

More descriptive error message when reading /etc/hosts file #4

@hurufu

Description

@hurufu

Hello, thanks for writing and maintaining s6 suite of tools.

I had quite a head-scratcher recently, because it was hard to deduce why s6-tcpclient failed with error:

s6-tcpclient: fatal: unable to init DNS: Invalid or incomplete multi-byte or wide character

I had to resort to reading sources... The problem was that I had some strange entries in /etc/hosts file:

fe80::1%lo0 localhost
0.0.0.0 0.0.0.0

Is it possible to extend error messages to inform that at least it was an error related to /etc/hosts file parsing? Or maybe ignore erroneous lines, because this file is commonly managed manually, so it is possible that it will contain some errors in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions