Browse Source

[213] Make the workaround for sockcreator work

It broke, since the socket creator no longer has a _procinfo attribute.
Michal 'vorner' Vaner 13 years ago
parent
commit
5038c63b05
1 changed files with 3 additions and 5 deletions
  1. 3 5
      src/bin/bind10/bind10_src.py.in

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

@@ -618,8 +618,9 @@ class BoB:
         Put another process into boss to watch over it.  When the process
         Put another process into boss to watch over it.  When the process
         dies, the info.failed() is called with the exit code.
         dies, the info.failed() is called with the exit code.
         """
         """
-        self.processes[pid] = info._procinfo
+        if '_procinfo' in dir(info):
-        if info._procinfo is None:
+            self.processes[pid] = info._procinfo
+        else:
             # XXX: a short term hack.  This is the sockcreator.
             # XXX: a short term hack.  This is the sockcreator.
             self.sockcreator = info._SockCreator__creator
             self.sockcreator = info._SockCreator__creator
 
 
@@ -934,9 +935,6 @@ class BoB:
                     logger.fatal(BIND10_SOCKCREATOR_CRASHED)
                     logger.fatal(BIND10_SOCKCREATOR_CRASHED)
                     self.sockcreator = None
                     self.sockcreator = None
                     self.runnable = False
                     self.runnable = False
-                # This was inserted in self.processes by register_process.
-                # Now need to remove it.
-                del self.processes[pid]
             elif pid in self.processes:
             elif pid in self.processes:
                 # One of the processes we know about.  Get information on it.
                 # One of the processes we know about.  Get information on it.
                 proc_info = self.processes.pop(pid)
                 proc_info = self.processes.pop(pid)