Browse Source

[2447] use helper __kill_children method to kill all initial processes

previously it could result in exception (by the attempt of killing sockcreator
as a chuser'ed process) during initial setup failure, leading to unclean
shutdown.  the revised code prevents it from happening, and also makes the
code concise by unifying the common logic.
JINMEI Tatuya 12 years ago
parent
commit
86ed7ae9cf
2 changed files with 1 additions and 10 deletions
  1. 0 5
      src/bin/bind10/bind10_messages.mes
  2. 1 5
      src/bin/bind10/bind10_src.py.in

+ 0 - 5
src/bin/bind10/bind10_messages.mes

@@ -94,11 +94,6 @@ and continue running as the specified user, but the user is unknown.
 The boss module was not able to start every process it needed to start
 The boss module was not able to start every process it needed to start
 during startup, and will now kill the processes that did get started.
 during startup, and will now kill the processes that did get started.
 
 
-% BIND10_KILL_PROCESS killing process %1
-The boss module is sending a kill signal to process with the given name,
-as part of the process of killing all started processes during a failed
-startup, as described for BIND10_KILLING_ALL_PROCESSES
-
 % BIND10_LOST_SOCKET_CONSUMER consumer %1 of sockets disconnected, considering all its sockets closed
 % BIND10_LOST_SOCKET_CONSUMER consumer %1 of sockets disconnected, considering all its sockets closed
 A connection from one of the applications which requested a socket was
 A connection from one of the applications which requested a socket was
 closed. This means the application has terminated, so all the sockets it was
 closed. This means the application has terminated, so all the sockets it was

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

@@ -331,11 +331,7 @@ class BoB:
             each one.  It then clears that list.
             each one.  It then clears that list.
         """
         """
         logger.info(BIND10_KILLING_ALL_PROCESSES)
         logger.info(BIND10_KILLING_ALL_PROCESSES)
-
-        for pid in self.components:
-            logger.info(BIND10_KILL_PROCESS, self.components[pid].name())
-            self.components[pid].kill(True)
-        self.components = {}
+        self.__kill_children(True)
 
 
     def _read_bind10_config(self):
     def _read_bind10_config(self):
         """
         """