def safe_mkdtemp(**kw):
  # proper lock sanitation on fork [issue 6721] would be desirable here.
  return _MKDTEMP_SINGLETON.register(tempfile.mkdtemp(**kw))
Create a temporary directory that is cleaned up on process exit.
dataset/ETHPy150Open pantsbuild/pex/pex/common.py/safe_mkdtemp