def start(self):
    """Starts the runtime process and waits until it is ready to serve."""
    runtime_config = self._runtime_config_getter()
    serialized_config = base64.b64encode(runtime_config.SerializeToString())
    # TODO: Use a different process group to isolate the child process
    # from signals sent to the parent. Only available in subprocess in
    # Python 2.7.
    with self._process_lock:
      assert not self._process, 'start() can only be called once'
      self._process = safe_subprocess.start_process(
          self._args,
          serialized_config,
          stdout=subprocess.PIPE,
          env=self._env,
          cwd=self._server_configuration.application_root)
    line = self._process.stdout.readline()
    try:
      self._port = int(line)
    except __HOLE__:
      # The development server is in a bad state. Log an error message and quit.
      logging.error('unexpected port response from runtime [%r]; '
                    'exiting the development server',
                    line)
      shutdown.async_quit()
    else:
      self._check_serving()
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/http_runtime.py/HttpRuntimeProxy.start