Comment 3 for bug 1527636

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

> I'll do a little test to see if this works.

With glibc gethostbyaddr(), and probably all resolver functions handle EINTR internally by retrying. So they are completely impervious to signals. Thanks glibc...

When the DNS server is absent (wrong IP in /etc/resolv.conf) I find two related workarounds to get short timeouts. Adding "options timeout:1 attempts:1" to /etc/resolve.conf or equivalently setting the RES_OPTIONS environment variable to "options timeout:1 attempts:1"

> cat << EOF >> /etc/resolve.conf
> options timeout:1 attempts:1
> EOF

and/or

> export RES_OPTIONS="options timeout:1 attempts:1"

Also install nscd (or equivalent) to cache the failed lookups.

And it is always possible to add entries in /etc/hosts, but of course this doesn't scale.