Browse Source

[213] Register a process to boss

It adds the support for a process to register itself inside boss.

The sockcreator already does that.
Michal 'vorner' Vaner 13 years ago
parent
commit
0e6639a843
2 changed files with 4 additions and 0 deletions
  1. 3 0
      src/bin/bind10/bind10_src.py.in
  2. 1 0
      src/lib/python/isc/bind10/component.py

+ 3 - 0
src/bin/bind10/bind10_src.py.in

@@ -870,6 +870,9 @@ class BoB:
         # return the time when the next process is ready to be restarted
         return next_restart
 
+    def register_process(self, pid, info):
+        self.processes[pid] = info
+
 # global variables, needed for signal handlers
 options = None
 boss_of_bind = None

+ 1 - 0
src/lib/python/isc/bind10/component.py

@@ -170,6 +170,7 @@ class SockCreator(Component):
         self._boss.curproc = 'b10-sockcreator'
         self.__creator = isc.bind10.sockcreator.Creator(LIBEXECDIR + ':' +
                                                         os.environ['PATH'])
+        self.__boss.register_process(self.__creator.pid(), self)
 
     def stop_internal(self, kill=False):
         if self.__creator is None: