@staticmethod
  def _close_fds():
    for fd in (sys.stdin, sys.stdout, sys.stderr):
      file_no = fd.fileno()
      fd.flush()
      fd.close()
      os.close(file_no)
Close pre-fork stdio streams to avoid output in the pants process that launched pantsd.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/pantsd/pants_daemon.py/PantsDaemon._close_fds