[svn] commit: r2152 - in /branches/trac190: ./ src/bin/cfgmgr/ src/bin/cfgmgr/tests/ src/bin/cmdctl/ src/bin/xfrin/ src/bin/xfrout/ src/lib/cc/ src/lib/dns/ src/lib/dns/rdata/generic/ src/lib/dns/tests/
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 17 21:21:09 UTC 2010
Author: jinmei
Date: Thu Jun 17 21:21:09 2010
New Revision: 2152
Log:
sync with trunk
Added:
branches/trac190/src/bin/cfgmgr/tests/
- copied from r2151, trunk/src/bin/cfgmgr/tests/
Modified:
branches/trac190/ (props changed)
branches/trac190/ChangeLog
branches/trac190/configure.ac
branches/trac190/src/bin/cfgmgr/Makefile.am
branches/trac190/src/bin/cfgmgr/b10-cfgmgr.py.in (contents, props changed)
branches/trac190/src/bin/cfgmgr/b10-cfgmgr.xml (props changed)
branches/trac190/src/bin/cmdctl/cmdctl.py.in
branches/trac190/src/bin/xfrin/ (props changed)
branches/trac190/src/bin/xfrout/xfrout.py.in
branches/trac190/src/lib/cc/ (props changed)
branches/trac190/src/lib/dns/ (props changed)
branches/trac190/src/lib/dns/rdata/generic/rrsig_46.cc (props changed)
branches/trac190/src/lib/dns/tests/ (props changed)
Modified: branches/trac190/ChangeLog
==============================================================================
--- branches/trac190/ChangeLog (original)
+++ branches/trac190/ChangeLog Thu Jun 17 21:21:09 2010
@@ -1,3 +1,8 @@
+ 55. [bug] shane
+ bin/xfrout: xfrout exception on Ctrl-C now no longer generates
+ exception for 'Interrupted system call'
+ (Track #136, svn r2147)
+
54. [bug] zhanglikun
bin/xfrout: Enable b10-xfrout can be launched in source
code tree.
Modified: branches/trac190/configure.ac
==============================================================================
--- branches/trac190/configure.ac (original)
+++ branches/trac190/configure.ac Thu Jun 17 21:21:09 2010
@@ -393,6 +393,7 @@
src/bin/bindctl/Makefile
src/bin/bindctl/tests/Makefile
src/bin/cfgmgr/Makefile
+ src/bin/cfgmgr/tests/Makefile
src/bin/host/Makefile
src/bin/loadzone/Makefile
src/bin/msgq/Makefile
@@ -423,6 +424,7 @@
src/lib/xfr/Makefile
])
AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
+ src/bin/cfgmgr/tests/b10-cfgmgr_test.py
src/bin/cmdctl/cmdctl.py
src/bin/cmdctl/run_b10-cmdctl.sh
src/bin/cmdctl/tests/cmdctl_test
Modified: branches/trac190/src/bin/cfgmgr/Makefile.am
==============================================================================
--- branches/trac190/src/bin/cfgmgr/Makefile.am (original)
+++ branches/trac190/src/bin/cfgmgr/Makefile.am Thu Jun 17 21:21:09 2010
@@ -1,8 +1,10 @@
+SUBDIRS = tests
+
pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-cfgmgr
-CLEANFILES = b10-cfgmgr
+CLEANFILES = b10-cfgmgr b10-cfgmgr.pyc
b10_cfgmgrdir = @localstatedir@/@PACKAGE@
#B10_cfgmgr_DATA =
Modified: branches/trac190/src/bin/cfgmgr/b10-cfgmgr.py.in
==============================================================================
--- branches/trac190/src/bin/cfgmgr/b10-cfgmgr.py.in (original)
+++ branches/trac190/src/bin/cfgmgr/b10-cfgmgr.py.in Thu Jun 17 21:21:09 2010
@@ -14,6 +14,8 @@
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# $Id$
import sys; sys.path.append ('@@PYTHONPATH@@')
@@ -38,7 +40,8 @@
if cm:
cm.running = False
-if __name__ == "__main__":
+def main():
+ global cm
try:
cm = ConfigManager(DATA_PATH)
signal.signal(signal.SIGINT, signal_handler)
@@ -53,3 +56,6 @@
print("[b10-cfgmgr] Interrupted, exiting")
if cm:
cm.write_config()
+
+if __name__ == "__main__":
+ main()
Modified: branches/trac190/src/bin/cmdctl/cmdctl.py.in
==============================================================================
--- branches/trac190/src/bin/cmdctl/cmdctl.py.in (original)
+++ branches/trac190/src/bin/cmdctl/cmdctl.py.in Thu Jun 17 21:21:09 2010
@@ -416,7 +416,7 @@
def run(addr = 'localhost', port = 8080, idle_timeout = 1200, verbose = False):
''' Start cmdctl as one https server. '''
if verbose:
- sys.stdout.write("[b10-cmdctl] starting on :%s port:%d\n" %(addr, port))
+ sys.stdout.write("[b10-cmdctl] starting on %s port:%d\n" %(addr, port))
httpd = SecureHTTPServer((addr, port), SecureHTTPRequestHandler, idle_timeout, verbose)
httpd.serve_forever()
Modified: branches/trac190/src/bin/xfrout/xfrout.py.in
==============================================================================
--- branches/trac190/src/bin/xfrout/xfrout.py.in (original)
+++ branches/trac190/src/bin/xfrout/xfrout.py.in Thu Jun 17 21:21:09 2010
@@ -28,6 +28,7 @@
from isc.config.ccsession import *
from isc.cc import SessionError
import socket
+import select
import errno
from optparse import OptionParser, OptionValueError
try:
@@ -363,11 +364,22 @@
self._lock.release()
def listen_on_xfr_query(unix_socket_server):
-
'''Listen xfr query in one single thread. Polls for shutdown
every 0.1 seconds, is there a better time?
'''
- unix_socket_server.serve_forever(poll_interval = 0.1)
+
+ while True:
+ try:
+ unix_socket_server.serve_forever(poll_interval = 0.1)
+ except select.error as err:
+ # serve_forever() calls select.select(), which can be
+ # interrupted.
+ # If it is interrupted, it raises select.error with the
+ # errno set to EINTR. We ignore this case, and let the
+ # normal program flow continue by trying serve_forever()
+ # again.
+ if err.args[0] != errno.EINTR: raise
+
class XfroutServer:
More information about the bind10-changes
mailing list