summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 352cda0d0..e2df0c913 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -392,17 +392,16 @@ try_to_debug (bool waitloop)
system_printf ("Failed to start debugger: %E");
else
{
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
if (!waitloop)
return 1;
+ SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
while (!being_debugged ())
Sleep (0);
Sleep (2000);
small_printf ("*** continuing from debugger call\n");
+ SetThreadPriority (GetCurrentThread (), prio);
}
- SetThreadPriority (GetCurrentThread (), prio);
-
/* FIXME: need to know handles of all running threads to
resume_all_threads_except (current_thread_id);
*/