Protect against process ending during enumeration