* exceptions.cc (try_to_debug): Don't use yield() when waiting for another
process. (sigpacket::setup_handler): Fix long-standing problem where loop could exit with lock held.
This commit is contained in:
parent
1952976a1b
commit
62003f180a
|
@ -1,3 +1,10 @@
|
||||||
|
2013-06-08 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
|
* exceptions.cc (try_to_debug): Don't use yield() when waiting for
|
||||||
|
another process.
|
||||||
|
(sigpacket::setup_handler): Fix long-standing problem where loop could
|
||||||
|
exit with lock held.
|
||||||
|
|
||||||
2013-06-08 Christopher Faylor <me.cygwin2013@cgf.cx>
|
2013-06-08 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
* miscfuncs.cc (yield): Revert (after researching) to calling SleepEx
|
* miscfuncs.cc (yield): Revert (after researching) to calling SleepEx
|
||||||
|
|
|
@ -508,7 +508,7 @@ try_to_debug (bool waitloop)
|
||||||
return dbg;
|
return dbg;
|
||||||
SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
|
SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
|
||||||
while (!being_debugged ())
|
while (!being_debugged ())
|
||||||
yield ();
|
Sleep (1);
|
||||||
Sleep (2000);
|
Sleep (2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -923,7 +923,10 @@ sigpacket::setup_handler (void *handler, struct sigaction& siga, _cygtls *tls)
|
||||||
DWORD res;
|
DWORD res;
|
||||||
HANDLE hth = (HANDLE) *tls;
|
HANDLE hth = (HANDLE) *tls;
|
||||||
if (!hth)
|
if (!hth)
|
||||||
|
{
|
||||||
|
tls->unlock ();
|
||||||
sigproc_printf ("thread handle NULL, not set up yet?");
|
sigproc_printf ("thread handle NULL, not set up yet?");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Suspend the thread which will receive the signal.
|
/* Suspend the thread which will receive the signal.
|
||||||
|
@ -936,6 +939,7 @@ sigpacket::setup_handler (void *handler, struct sigaction& siga, _cygtls *tls)
|
||||||
/* Just set pending if thread is already suspended */
|
/* Just set pending if thread is already suspended */
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
|
tls->unlock ();
|
||||||
ResumeThread (hth);
|
ResumeThread (hth);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue