From: JINMEI Tatuya Date: Thu, 8 Nov 2012 07:37:47 +0000 (-0800) Subject: [2447] use helper __kill_children method to kill all initial processes X-Git-Tag: trac2487_base~1^2~31^2~1^2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86ed7ae9cfb4184f5637a2e478242f0a646ba2e1;p=thirdparty%2Fkea.git [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. --- diff --git a/src/bin/bind10/bind10_messages.mes b/src/bin/bind10/bind10_messages.mes index ed2a5d939b..bb996c8e49 100644 --- a/src/bin/bind10/bind10_messages.mes +++ b/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 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 diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in index 4c3b6f4d81..1c6ba10ebd 100755 --- a/src/bin/bind10/bind10_src.py.in +++ b/src/bin/bind10/bind10_src.py.in @@ -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): """