def _watch_parent_process(self, parent_pipe):
    parent_pipe[1].close()
    try:
        parent_pipe[0].recv()
    except EOFError:
        pass
    if self._ready.is_set():
        LOG.info(('Parent process has died unexpectedly, %s exiting' % self.title))
        if (os.name == 'posix'):
            os.kill(os.getpid(), signal.SIGTERM)
        else:
            self._signals_received.appendleft(signal.SIGTERM)
    else:
        os._exit(0)
def _watch_parent_process(self, parent_pipe):
    parent_pipe[1].close()
    try:
        parent_pipe[0].recv()
    except EOFError:
        pass
    if self._ready.is_set():
        LOG.info(('Parent process has died unexpectedly, %s exiting' % self.title))
        if (os.name == 'posix'):
            os.kill(os.getpid(), signal.SIGTERM)
        else:
            self._signals_received.appendleft(signal.SIGTERM)
    else:
        os._exit(0)