@staticmethod
    def fork_process(name, port = 9199, config = ""):
        cmd = "juba" + name
        args = [cmd, "--rpc-port", str(port), "--configpath", config, "--thread", "100", "--datadir", "."]
        try:
            if TestUtil.check_server(port):
                raise Exception('Another server is already running')
            proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
            # use PIPE to suppress log messages of server processes
            try:
                TestUtil.wait_server(port, proc)
            except Exception:
                proc.kill()
                raise
            if proc.poll():
                stderr = proc.stderr.read()
                raise Exception('Cannot run server process: \n' + stderr)
            return proc
        except __HOLE__ as error:
            print('Unable to fork. Error: {0} ({1})'.format(error.errno, error.strerror))
            raise error
dataset/ETHPy150Open jubatus/jubatus-python-client/test/jubatus_test/test_util.py/TestUtil.fork_process