BIND 10 trac1819, updated. 048206388a5b4eaadc752b2769b125b073caade2 bug #1819: Add boss nokill flag (-i/--no-kill-i)
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Mar 21 11:08:49 UTC 2012
The branch, trac1819 has been updated
via 048206388a5b4eaadc752b2769b125b073caade2 (commit)
from 766e74511e7c99d3d224e15b5f8a8afb5d154ea5 (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 048206388a5b4eaadc752b2769b125b073caade2
Author: Mukund Sivaraman <muks at isc.org>
Date: Wed Mar 21 16:35:28 2012 +0530
bug #1819: Add boss nokill flag (-i/--no-kill-i)
-----------------------------------------------------------------------
Summary of changes:
src/bin/bind10/bind10_src.py.in | 45 ++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 19 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in
index edc1b69..721e6ee 100755
--- a/src/bin/bind10/bind10_src.py.in
+++ b/src/bin/bind10/bind10_src.py.in
@@ -685,6 +685,7 @@ class BoB:
def shutdown(self):
"""Stop the BoB instance."""
+ global options
logger.info(BIND10_SHUTDOWN)
# If ccsession is still there, inform rest of the system this module
# is stopping. Since everything will be stopped shortly, this is not
@@ -702,32 +703,36 @@ class BoB:
# still not enough.
time.sleep(1)
self.reap_children()
- # next try sending a SIGTERM
- components_to_stop = list(self.components.values())
- for component in components_to_stop:
- logger.info(BIND10_SEND_SIGTERM, component.name(), component.pid())
- try:
- component.kill()
- except OSError:
- # ignore these (usually ESRCH because the child
- # finally exited)
- pass
- # finally, send SIGKILL (unmaskable termination) until everybody dies
- while self.components:
- # XXX: some delay probably useful... how much is uncertain
- time.sleep(0.1)
- self.reap_children()
+
+ # Send TERM and KILL signals to modules if we're not prevented
+ # from doing so
+ if not options.nokill:
+ # next try sending a SIGTERM
components_to_stop = list(self.components.values())
for component in components_to_stop:
- logger.info(BIND10_SEND_SIGKILL, component.name(),
- component.pid())
+ logger.info(BIND10_SEND_SIGTERM, component.name(), component.pid())
try:
- component.kill(True)
+ component.kill()
except OSError:
# ignore these (usually ESRCH because the child
# finally exited)
pass
- logger.info(BIND10_SHUTDOWN_COMPLETE)
+ # finally, send SIGKILL (unmaskable termination) until everybody dies
+ while self.components:
+ # XXX: some delay probably useful... how much is uncertain
+ time.sleep(0.1)
+ self.reap_children()
+ components_to_stop = list(self.components.values())
+ for component in components_to_stop:
+ logger.info(BIND10_SEND_SIGKILL, component.name(),
+ component.pid())
+ try:
+ component.kill(True)
+ except OSError:
+ # ignore these (usually ESRCH because the child
+ # finally exited)
+ pass
+ logger.info(BIND10_SHUTDOWN_COMPLETE)
def _get_process_exit_status(self):
return os.waitpid(-1, os.WNOHANG)
@@ -1043,6 +1048,8 @@ def parse_args(args=sys.argv[1:], Parser=OptionParser):
help="UNIX domain socket file the b10-msgq daemon will use")
parser.add_option("-n", "--no-cache", action="store_true", dest="nocache",
default=False, help="disable hot-spot cache in authoritative DNS server")
+ parser.add_option("-i", "--no-kill-i", action="store_true", dest="nokill",
+ default=False, help="do not send SIGTERM or SIGKILL signals to modules")
parser.add_option("-u", "--user", dest="user", type="string", default=None,
help="Change user after startup (must run as root)")
parser.add_option("-v", "--verbose", dest="verbose", action="store_true",
More information about the bind10-changes
mailing list