ptrace: optimize exit_ptrace() for the likely case