def _cleanup():
    for inst in _active[:]:
        res = inst._internal_poll(_deadstate=sys.maxint)
        if res is not None:
            try:
                _active.remove(inst)
            except __HOLE__:
                # This can happen if two threads create a new Popen instance.
                # It's harmless that it was already removed, so ignore.
                pass
dataset/ETHPy150Open clips/pattern/pattern/server/cherrypy/cherrypy/_cpcompat_subprocess.py/_cleanup