BIND 10 master, updated. ad11aede925c7307dd3a6528be0d1e8e4723d162 [2790] Short-term workaround for the blocking read loop in zonemgr

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 26 09:06:50 UTC 2013


The branch, master has been updated
       via  ad11aede925c7307dd3a6528be0d1e8e4723d162 (commit)
      from  75af5cd564de8cec47f2ed5ab3b5cb028acdd0ca (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 -----------------------------------------------------------------
commit ad11aede925c7307dd3a6528be0d1e8e4723d162
Author: Jelte Jansen <jelte at isc.org>
Date:   Tue Mar 26 10:05:51 2013 +0100

    [2790] Short-term workaround for the blocking read loop in zonemgr
    
    In the end we'll need to address the threading model in zonemgr, but this should be a good short-term workaround for the problem.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/zonemgr/zonemgr.py.in |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

-----------------------------------------------------------------------
diff --git a/src/bin/zonemgr/zonemgr.py.in b/src/bin/zonemgr/zonemgr.py.in
index b4e78b1..619e017 100755
--- a/src/bin/zonemgr/zonemgr.py.in
+++ b/src/bin/zonemgr/zonemgr.py.in
@@ -690,7 +690,19 @@ class Zonemgr:
         self.running = True
         try:
             while not self._shutdown_event.is_set():
-                self._module_cc.check_command(False)
+                fileno = self._module_cc.get_socket().fileno()
+                # Wait with select() until there is something to read,
+                # and then read it using a non-blocking read
+                # This may or may not be relevant data for this loop,
+                # but due to the way the zonemgr does threading, we
+                # can't have a blocking read loop here.
+                try:
+                    (reads, _, _) = select.select([fileno], [], [])
+                except select.error as se:
+                    if se.args[0] != errno.EINTR:
+                        raise
+                if fileno in reads:
+                    self._module_cc.check_command(True)
         finally:
             self._module_cc.send_stopping()
 



More information about the bind10-changes mailing list