BIND 10 #134: xfrout not killed by SIGTERM
BIND 10 Development
do-not-reply at isc.org
Thu Apr 22 13:59:03 UTC 2010
#134: xfrout not killed by SIGTERM
--------------------------+-------------------------------------------------
Reporter: jreed | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: Unclassified | Resolution:
Keywords: | Sensitive: 0
--------------------------+-------------------------------------------------
Comment(by shane):
Replying to [comment:4 shane]:
> To do this "properly", bind10 should do something like this:
>
> * Send a shutdown request to all processes
> * Wait for processes to die
> * When they all die, exit
> * If more than X seconds pass, send SIGTERM to all processes
> * Wait for processes to die
> * When they all die, exit
> * If more than X seconds pass, send SIGKILL to all processes
> * Wait for processes to die
Additionally, we should probably kill msgq last, in case some process
needs it to exit. This complicates things a bit.
def terminate(processes, timeout=2.0):
for process in processes:
ask_politely_to_exit
reap_all_processes(timeout)
for process in processes:
process.kill(SIGTERM)
reap_all_processes(timeout)
for process in processes:
process.kill(SIGKILL)
reap_all_processes(timeout)
def shutdown():
to_terminate = processes
to_terminate.remove(msgq)
terminate(to_terminate)
terminate(msgq)
Note this could slow things down if msgq was being unruly, but that is
unlikely. :)
--
Ticket URL: <http://bind10.isc.org/ticket/134#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list