🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #2737

gethostby*() failure diagnostics (was Re: pardon a simple(?) question...)

#2737
From: Don Lewis
Date: Wed, 20 Jul 1994 07:34
27 lines
2095 bytes
In article <30gm2c$5tp@rodan.UU.NET>, Rich Salz <rsalz@uunet.uu.net> wrote:
>In <30enum$30q@sunrise.gv.ssi1.com> gdonl@gv.ssi1.com (Don Lewis) writes:

[ nnrpd prints a message based on errno when gethostbyaddr() fails ]

>>Nnrpd should be reporting the value of h_errno in this case rather than
>>relying on perror() or its equivalent.
>
>Err, well, I dunno.
>
>Is h_errno really standard?  I don't think so, but I suppose I could be
>convinced otherwise.

I don't know if it is standard, but it seems to be really common.  It's
documented in the man pages on HPUX and Apollo DomainOS.  The Apollo
man page mentions herror(), which seems to be a perror() equivalent.
Both h_errno and herror() are mentioned in the man page included in
the beta distribution of BIND 4.9.3.  The SunOS 4.1.x man page does not
document h_errno, but it's defined in the include file <netdb.h>.  I
don't have any other Un*x boxes handy that I can examine.

None of the man pages document errno being set if gethostby*() fails.
-- 
Don "Truck" Lewis                                       Silicon Systems
Internet: gdonl@gv.ssi1.com                             138 New Mohawk Road
Phone: +1 916 478-8284       FAX: +1 916 478-8251       Nevada City, CA  95959
Technical Details
Message-ID: <30ik1j$ctt@sunrise.gv.ssi1.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.programmer.mbox.zip!nntp.gmd.de!Germany.EU.net!EU.net!uunet!ssigv!gdonl
References: <303aol$3ie@ruby.ora.com> <304cc0$9r@lyra.csx.cam.ac.uk> <30enum$30q@sunrise.gv.ssi1.com> <30gm2c$5tp@rodan.UU.NET>

Show Full Headers
Complete Article Headers
Message-ID: <30ik1j$ctt@sunrise.gv.ssi1.com>
Subject: gethostby*() failure diagnostics (was Re: pardon a simple(?) question...)
Date: Wed, 20 Jul 1994 07:34:11 +0000
From: gdonl@gv.ssi1.com (Don Lewis)
References: <303aol$3ie@ruby.ora.com> <304cc0$9r@lyra.csx.cam.ac.uk> <30enum$30q@sunrise.gv.ssi1.com> <30gm2c$5tp@rodan.UU.NET>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.programmer.mbox.zip!nntp.gmd.de!Germany.EU.net!EU.net!uunet!ssigv!gdonl
Newsgroups: news.software.nntp,comp.unix.programmer
Organization: Silicon Systems, Nevada City CA
Lines: 26
Distribution: inet
NNTP-Posting-Host: sunrise.gv.ssi1.com
NNTP-Posting-User: gdonl