]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2447] use helper __kill_children method to kill all initial processes
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 8 Nov 2012 07:37:47 +0000 (23:37 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 8 Nov 2012 08:31:42 +0000 (00:31 -0800)
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.

src/bin/bind10/bind10_messages.mes
src/bin/bind10/bind10_src.py.in

index ed2a5d939bfeb3aeab516150a2b345699c893cb3..bb996c8e492f788cd5b79f7a63520a190a833e41 100644 (file)
@@ -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
 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
 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
index 4c3b6f4d81ee0d73c6bfc077fca3a7d07600d0d1..1c6ba10ebdc549466277490e6ad0804c0f7cdc20 100755 (executable)
@@ -331,11 +331,7 @@ class BoB:
             each one.  It then clears that list.
         """
         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):
         """