Author: aurel32
Date: 2010-09-14 23:48:09 +0000 (Tue, 14 Sep 2010)
New Revision: 4426

Added:
   glibc-package/trunk/debian/patches/any/submitted-resolv.conf-thread.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * any/submitted-resolv.conf-thread.diff: new patch to correctly reload
    resolv.conf all threads.  Closes: #596499.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2010-09-14 15:56:36 UTC (rev 
4425)
+++ glibc-package/trunk/debian/changelog        2010-09-14 23:48:09 UTC (rev 
4426)
@@ -10,6 +10,8 @@
     locale, emit a warning and disable it instead of failing.  
     Closes: #596695.
   * Add armhf support.  Closes: #596804.
+  * any/submitted-resolv.conf-thread.diff: new patch to correctly reload
+    resolv.conf all threads.  Closes: #596499.
 
   [ Samuel Thibault ]
   * patches/hurd-i386/submitted-catch-signal.diff: New patch to fix

Added: glibc-package/trunk/debian/patches/any/submitted-resolv.conf-thread.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-resolv.conf-thread.diff    
                        (rev 0)
+++ glibc-package/trunk/debian/patches/any/submitted-resolv.conf-thread.diff    
2010-09-14 23:48:09 UTC (rev 4426)
@@ -0,0 +1,26 @@
+2010-09-15  Aurelien Jarno  <aurel...@aurel32.net>
+ 
+       * resolv/res_libc (__res_maybe_init): Ask other threads to
+       to re-initialize their resolver states when _PATH_RESCONF
+       changes.
+
+--- a/resolv/res_libc.c
++++ b/resolv/res_libc.c
+@@ -100,10 +100,13 @@
+ 
+       if (resp->options & RES_INIT) {
+               ret = stat (_PATH_RESCONF, &statbuf);
+-              if ((__res_initstamp != resp->_u._ext.initstamp)
+-                  || ((ret == 0) && (last_mtime != statbuf.st_mtime))) {
+-                      if (ret == 0)
+-                              last_mtime = statbuf.st_mtime;
++              if ((ret == 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);
+                       return __res_vinit (resp, 1);

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2010-09-14 15:56:36 UTC (rev 
4425)
+++ glibc-package/trunk/debian/patches/series   2010-09-14 23:48:09 UTC (rev 
4426)
@@ -261,3 +261,4 @@
 #any/cvs-flush-cache-textrels.diff
 any/cvs-__block.diff
 any/cvs-sunrpc-license.diff
+any/submitted-resolv.conf-thread.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1ovfeq-0005fn...@alioth.debian.org

Reply via email to