Browse Source

Cleanup shutdown messages a bit.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1088 e5f2f494-b856-4b98-b285-d166d9295462
Shane Kerr 15 years ago
parent
commit
a9ffdf731e
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/bin/bind10/bind10.py.in

+ 5 - 5
src/bin/bind10/bind10.py.in

@@ -322,7 +322,7 @@ class BoB:
                     sys.stdout.write("Process %s (PID %d) died.\n" % 
                                      (proc_info.name, proc_info.pid))
                 if proc_info.name == "msgq":
-                    if self.verbose:
+                    if self.verbose and self.runnable:
                         sys.stdout.write(
                                      "The msgq process died, shutting down.\n")
                     self.runnable = False
@@ -482,6 +482,10 @@ def main():
     wakeup_fd = wakeup_pipe[0]
     ccs_fd = boss_of_bind.ccs.get_socket().fileno()
     while boss_of_bind.runnable:
+        # clean up any processes that exited
+        boss_of_bind.reap_children()
+        boss_of_bind.restart_processes()
+
         # XXX: get time for next restart for timeout
 
         # select() can raise EINTR when a signal arrives, 
@@ -502,10 +506,6 @@ def main():
             elif fd == wakeup_fd:
                 os.read(wakeup_fd, 32)
 
-        # clean up any processes that exited
-        boss_of_bind.reap_children()
-        boss_of_bind.restart_processes()
-
     # shutdown
     signal.signal(signal.SIGCHLD, signal.SIG_DFL)
     boss_of_bind.shutdown()