getaddrinfo() blocks indefinitely when DNS query times out
Goal: Apply a per‑call timeout to the getaddrinfo() function in a portable C program while correctly interpreting EAI_AGAIN (transient) and EAI_NONAME (permanent) results. Constraints: The standard getaddrinfo() API lacks a timeout argument; blocking time is dictated by system resolver configuration ( /etc/resolv.conf options on Linux, hard‑coded defaults in