Re-run res_init() when resolv.conf changes

libc caches the contents of resolv.conf, so if it changes (eg, because
the network state changed), we need re-run res_init().

http://bugzilla.gnome.org/show_bug.cgi?id=584246
This commit is contained in:
Dan Winship
2009-08-19 12:07:53 -04:00
parent 6db03d73a4
commit 021dd960cf
5 changed files with 132 additions and 24 deletions

View File

@@ -284,6 +284,9 @@ start_async_lookups (char **argv, int argc)
lookup_by_name_callback,
argv[i]);
}
/* Stress-test the reloading code */
g_signal_emit_by_name (resolver, "reload");
}
}