This is a discussion on getaddrinfo fails is syslogd is down within the AIX Operating System forums, part of the Unix Operating Systems category; --> Platform: AIX 5.1 on a P650 We have just discovered that if I call getaddrinfo() in the following manner ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Platform: AIX 5.1 on a P650 We have just discovered that if I call getaddrinfo() in the following manner when syslogd is down: struct addrinfo *ai_list; struct addrinfo hints; char hostname[255] = "myhost.cnf.com"; char servname[10]; int error; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; sprintf(servname, "%d", 10003); error = getaddrinfo(hostname, servname, &hints, &ai_list); That it will fail with a return code of 11 and errno set to 9. return code of 11 means "system error returned in errno" and errno of 9 is EBADF. If syslogd is NOT down making the above call will result in the following syslog message: syslog: The user option is different from the address family passed into the API. Note: the /etc/netsvc.conf file contains the following: hosts = local=auth, bind4 Does anyone know why we get the syslog message or why the call fails when syslogd is down ??? Thanks, -tony |