Browse Source

[1365] added documentation about why SockCreator.__creator shhouldn't be removed.

JINMEI Tatuya 13 years ago
parent
commit
0428f6fcc7

+ 3 - 0
src/lib/python/isc/bind10/sockcreator.py

@@ -201,6 +201,9 @@ class WrappedSocket:
 class Creator(Parser):
     """
     This starts the socket creator and allows asking for the sockets.
+
+    Note: __process shouldn't be reset once created.  See the note
+    of the SockCreator class for details.
     """
     def __init__(self, path):
         (local, remote) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)

+ 5 - 0
src/lib/python/isc/bind10/special_component.py

@@ -22,6 +22,11 @@ class SockCreator(Component):
     """
     The socket creator component. Will start and stop the socket creator
     accordingly.
+
+    Note: _creator shouldn't be reset explicitly once created.  The
+    underlying Popen object would then wait() the child process internally,
+    which breaks the assumption of the boss, who is expecting to see
+    the process die in waitpid().
     """
     def __init__(self, process, boss, kind, address=None, params=None):
         Component.__init__(self, process, boss, kind)