bug-glibc
[Top][All Lists]
Advanced

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

Return value of gethostbyname_r


From: Pappu
Subject: Return value of gethostbyname_r
Date: Fri, 8 Feb 2002 17:39:29 +0530

Hi,

   In the info page for gethostbyname_r, it is mentioned that
"Success is signalled by a zero return value".  

But when  I give the hostname as  1.2.3.4.5 (4 dots and  5 numbers, or
any such invalid address), I am getting a return value 0. The variable
pointed  to by  h_errnop has  the error  code HOST_NOT_FOUND,  and the
hostent structure is null, as described in the manual.

The  return value  is non  zero  if I  give a  non existent  hostname,
instead of an invalid ip address. 

Is this a bug or is there any reason for this behavior? 

Thanks and regards,
pappu. 

NB: Please Cc me as I am not subscribed to the list. 



reply via email to

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