Commit b1881fc5 authored by Shane Kerr's avatar Shane Kerr
Browse files

Do not start if msgq is already running.



git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1087 e5f2f494-b856-4b98-b285-d166d9295462
parent c6203e01
......@@ -152,11 +152,22 @@ class BoB:
Returns None if successful, otherwise an string describing the
problem.
"""
# try to connect to the c-channel daemon,
# to see if it is already running
c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
if self.verbose:
sys.stdout.write("Checking for already running msgq\n")
# try to connect, and if we can't wait a short while
try:
self.cc_session = isc.cc.Session(self.c_channel_port)
return "msgq already running, cannot start"
except isc.cc.session.SessionError:
pass
# start the c-channel daemon
if self.verbose:
sys.stdout.write("Starting msgq using port %d\n" %
self.c_channel_port)
c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
try:
c_channel = ProcessInfo("msgq", "msgq", c_channel_env, True)
except Exception as e:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment