def cleanup_environment():
SERV.terminate()<EOL>shutil.rmtree(TMP_PATH)<EOL>if os.path.exists(TMP_PATH):<EOL><INDENT>os.rmdir(TMP_PATH)<EOL><DEDENT>global TMP_PATH<EOL>TMP_PATH = None<EOL>
Shutdown the ZEO server process running in another thread and cleanup the
temporary directory.