def close_ssh():
  global _master_keys_lock

  terminate_ssh_clients()

  for p in _master_processes:
    try:
      os.kill(p.pid, SIGTERM)
      p.wait()
    except OSError:
      pass
  del _master_processes[:]
  _master_keys.clear()

  d = ssh_sock(create=False)
  if d:
    try:
      os.rmdir(os.path.dirname(d))
    except __HOLE__:
      pass

  # We're done with the lock, so we can delete it.
  _master_keys_lock = None
dataset/ETHPy150Open android/tools_repo/git_config.py/close_ssh