Commit 2fef71dd authored by Shane Kerr's avatar Shane Kerr
Browse files

HACK HACK HACK - only send msgq to /dev/null for now.



git-svn-id: svn://bind10.isc.org/svn/bind10/branches/f2f200910@262 e5f2f494-b856-4b98-b285-d166d9295462
parent 93540f8e
......@@ -46,20 +46,25 @@ class ProcessInfo:
dev_null = open("/dev/null", "w")
def _spawn(self):
if self.dev_null_stdout:
spawn_stdout = self.dev_null
else:
spawn_stdout = None
spawn_env = self.env
spawn_env['PATH'] = os.environ['PATH']
self.process = subprocess.Popen(self.args,
stdin=subprocess.PIPE,
stdout=self.dev_null,
stderr=self.dev_null,
stdout=spawn_stdout,
stderr=spawn_stdout,
close_fds=True,
env=spawn_env,)
self.pid = self.process.pid
def __init__(self, name, args, env={}):
def __init__(self, name, args, env={}, dev_null_stdout=False):
self.name = name
self.args = args
self.env = env
self.dev_null_stdout = dev_null_stdout
self._spawn()
def respawn(self):
......@@ -94,7 +99,7 @@ class BoB:
self.c_channel_port)
c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
try:
c_channel = ProcessInfo("msgq", "msgq", c_channel_env)
c_channel = ProcessInfo("msgq", "msgq", c_channel_env, True)
except Exception as e:
return "Unable to start msgq; " + str(e)
self.processes[c_channel.pid] = c_channel
......
Markdown is supported
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