]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1183. [bug] Handle ENOSR error when writing to the internal
authorAndreas Gustafsson <source@isc.org>
Wed, 23 Jan 2002 02:35:56 +0000 (02:35 +0000)
committerAndreas Gustafsson <source@isc.org>
Wed, 23 Jan 2002 02:35:56 +0000 (02:35 +0000)
                        control pipe. [RT #2395]

CHANGES
lib/isc/unix/socket.c

diff --git a/CHANGES b/CHANGES
index 4785e8a1bb04a4fc8d21035a8d311b5a685858ad..46d1fe59f6bff91918f5c82adc8fd92b5abe347b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@
 1184.  [bug]           libbind: call res_ndestroy() if RES_INIT is set
                        when res_*init() is called.
 
+1183.  [bug]           Handle ENOSR error when writing to the internal
+                       control pipe. [RT #2395]
+
 1182.  [bug]           The server could throw an assertion failure when
                        constructing a negative response packet.
 
index 19cf62a5317cf742cdc3c135c9300c6bafd38bf0..523e34dd14c48e09190aa03f192ccb46beacf217 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.207.2.6 2002/01/22 23:17:44 gson Exp $ */
+/* $Id: socket.c,v 1.207.2.7 2002/01/23 02:35:56 gson Exp $ */
 
 #include <config.h>
 
@@ -378,6 +378,16 @@ select_poke(isc_socketmgr_t *mgr, int fd, int msg) {
 
        do {
                cc = write(mgr->pipe_fds[1], buf, sizeof(buf));
+#ifdef ENOSR
+               /*
+                * Treat ENOSR as EAGAIN but loop slowly as it is
+                * unlikely to clear fast.
+                */
+               if (cc < 0 && errno == ENOSR) {
+                       sleep(1);
+                       errno = EAGAIN;
+               }
+#endif
        } while (cc < 0 && SOFT_ERROR(errno));
                                
        if (cc < 0) {