Which is why I have gotten rid of getaddrinfo() calls in my server code, and rather resolve DNS directly reading the DNS server setting from the system.
Other issues I faced :
- Not epoll() friendly. Always forks a process while resolving domain name.
- Valgrind complains of uninitialized memory touches when the function is called and I can't get rid of it.