[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: canon-host errors

From: Jim Meyering
Subject: Re: canon-host errors
Date: Sun, 04 Sep 2005 10:57:04 +0200

Derek Price <address@hidden> wrote:
> Would anyone object to a patch that caused canon-host to output warnings
> via error (0, ...) when one of the functions it calls fails?
> getaddrinfo returns errors differently than gethostbyname and
> gethostbyaddr, making outputting a useful error message upon seeing a
> simple NULL return from canon_host challenging, to say the least.

The only two uses in coreutils are in who.c and pinky.c,
so that wouldn't cause much trouble.  But if some library code
uses canon_host, such a change wouldn't go down as well.

I suppose the question is whether any library-like code
(that would not welcome the output to stderr) uses canon_host.

Personally, I don't mind if you add the code to emit warnings now,
as long as you agree to adjust the API later, (e.g., to add
a new enum parameter describing the error) if anyone complains.
Of course, it'd be better to keep it library-safe.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]