Improved DNS resolving for laptops?

Petter Reinholdtsen pere@hungry.com
Mon Jul 26 12:37:00 GMT 2004


[Nix]
> If you don't mind nonportability you could use fcntl (...,
> F_NOTIFY,...)  to find out the instant resolv.conf is changed. (In
> practice you'd probably just set a flag on notification and consult
> the flag on next DNS lookup: rereading resolv.conf more often than
> that is pointless.)

This feature notifies the process using SIGIO (at least acording to
<URL:http://linux.com.hk/PenguinWeb/manpage.jsp?name=fcntl&section=2>),
so it is not very good to use in a library.

Checking the file every 10 minutes or every 10000 lookup sounds like a
good idea.  I wish glibc would do something similiar.



More information about the Libc-alpha mailing list