This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch gentoo/2.23 updated. glibc-2.23-5-g9f0a717
- From: vapier at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 19 Feb 2016 16:29:02 -0000
- Subject: GNU C Library master sources branch gentoo/2.23 updated. glibc-2.23-5-g9f0a717
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, gentoo/2.23 has been updated
via 9f0a71762084b0289e5988ea63830f9b6e006c39 (commit)
from 500248f4ce74940538c4db40f4815725f4c20c77 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f0a71762084b0289e5988ea63830f9b6e006c39
commit 9f0a71762084b0289e5988ea63830f9b6e006c39
Author: Thorsten Kukuk <kukuk@suse.de>
Date: Sun May 27 14:44:22 2007 -0400
reload /etc/resolv.conf when it has changed
if /etc/resolv.conf is updated, then make sure applications
already running get the updated information.
ripped from SuSE
http://bugs.gentoo.org/177416
diff --git a/resolv/res_libc.c b/resolv/res_libc.c
index a8394e0..641a7a2 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
@@ -22,6 +22,7 @@
#include <arpa/nameser.h>
#include <resolv.h>
#include <libc-lock.h>
+#include <sys/stat.h>
/* The following bit is copied from res_data.c (where it is #ifdef'ed
@@ -95,6 +96,20 @@ int
__res_maybe_init (res_state resp, int preinit)
{
if (resp->options & RES_INIT) {
+ static time_t last_mtime, last_check;
+ time_t now;
+ struct stat statbuf;
+
+ time (&now);
+ if (now != last_check) {
+ last_check = now;
+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
+ last_mtime = statbuf.st_mtime;
+ atomicinclock (lock);
+ atomicinc (__res_initstamp);
+ atomicincunlock (lock);
+ }
+ }
if (__res_initstamp != resp->_u._ext.initstamp) {
if (resp->nscount > 0)
__res_iclose (resp, true);
-----------------------------------------------------------------------
Summary of changes:
resolv/res_libc.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources