def _GetMasterInfo():
  logging.debug("Opening transport over stdin/out")
  with contextlib.closing(transport.FdTransport((0, 1))) as trans:
    logging.debug("Reading job id from the master process")
    job_id = int(trans.Call(""))
    logging.debug("Got job id %d", job_id)
    logging.debug("Reading the livelock name from the master process")
    livelock_name = livelock.LiveLockName(trans.Call(""))
    logging.debug("Got livelock %s", livelock_name)
    logging.debug("Reading secret parameters from the master process")
    secret_params = trans.Call("")
    logging.debug("Got secret parameters.")
  return (job_id, livelock_name, secret_params)
Gets rid of already read data (since we can't rewind).
dataset/ETHPy150Open ganeti/ganeti/lib/jqueue/exec.py/_GetMasterInfo--crossover with--dataset/ETHPy150Open kdart/pycopia/core/pycopia/inet/fcgi.py/InputStream._shrinkBuffer