bug-guile
[Top][All Lists]
Advanced

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

Inconsistent behaviour of gethost/getnet/getproto/getserv


From: Martin Grabmueller
Subject: Inconsistent behaviour of gethost/getnet/getproto/getserv
Date: Thu, 1 Mar 2001 10:31:11 +0100 (MET)

Hello list,

gethost, when called without arguments, behaves like gethostent, just
like getnet, getproto and getserv without arguments should behave like
their *ent counterparts.

gethost returns #f if no further entries are available, but getnet,
getproto and getserv signal errors (at least on my GNU/Linux box).

The difference is documented in gethost with the following comment:

          /* As far as I can tell, there's no good way to tell whether
             zero means an error or end-of-file.  The trick of
             clearing errno before calling gethostent and checking it
             afterwards doesn't cut it, because, on Linux, it seems to
             try to contact some other server (YP?) and fails, which
             is a benign failure.  */

I would like to fix getnet, getproto and getserv by using the same
hack like in gethost.  If I have overlooked something, please tell me,
otherwise I will apply my (trivial) fix.

Regards,
  'martin



reply via email to

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