'Monitor the child process'

def _monitorProcess(self):

    self.processContainer.lock.acquire()
    try:
        if ((self.processContainer.agent is None) or (self.processContainer.agent.poll() is not None)):
            self.processContainer.agent = self._launchAgentProcess()
    except Exception as e:
        self.logger.error(traceback.format_exc(e))
    finally:
        self.processContainer.lock.release()
