* exceptions.cc (_cygtls::interrupt_now): Back out previous change since it
could theoretically cause a non-CTRL-C-able program if a program has suffered memory corruption. (setup_handler): Ditto.
This commit is contained in:
parent
5e6a91549e
commit
57e64035f8
@ -1,3 +1,10 @@
|
|||||||
|
2011-07-06 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||||
|
|
||||||
|
* exceptions.cc (_cygtls::interrupt_now): Back out previous change
|
||||||
|
since it could theoretically cause a non-CTRL-C-able program if a
|
||||||
|
program has suffered memory corruption.
|
||||||
|
(setup_handler): Ditto.
|
||||||
|
|
||||||
2011-07-06 Corinna Vinschen <corinna@vinschen.de>
|
2011-07-06 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* sched.c (sched_yield): Just call SwitchToThread because yield now
|
* sched.c (sched_yield): Just call SwitchToThread because yield now
|
||||||
|
@ -777,8 +777,9 @@ _cygtls::interrupt_now (CONTEXT *cx, int sig, void *handler,
|
|||||||
|
|
||||||
/* Delay the interrupt if we are
|
/* Delay the interrupt if we are
|
||||||
1) somehow inside the DLL
|
1) somehow inside the DLL
|
||||||
2) in a Windows DLL. */
|
2) in _sigfe (spinning is true) and about to enter cygwin DLL
|
||||||
if (incyg ||inside_kernel (cx))
|
3) in a Windows DLL. */
|
||||||
|
if (incyg || spinning || inside_kernel (cx))
|
||||||
interrupted = false;
|
interrupted = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -882,15 +883,8 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
|
|||||||
cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
|
cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
|
||||||
if (!GetThreadContext (hth, &cx))
|
if (!GetThreadContext (hth, &cx))
|
||||||
system_printf ("couldn't get context of thread, %E");
|
system_printf ("couldn't get context of thread, %E");
|
||||||
else if (!tls->spinning)
|
|
||||||
interrupted = tls->interrupt_now (&cx, sig, handler, siga);
|
|
||||||
else
|
else
|
||||||
{
|
interrupted = tls->interrupt_now (&cx, sig, handler, siga);
|
||||||
/* We should be out of this state very soon so force a retry
|
|
||||||
without incrementing loop counter. */
|
|
||||||
i--;
|
|
||||||
interrupted = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
tls->unlock ();
|
tls->unlock ();
|
||||||
res = ResumeThread (hth);
|
res = ResumeThread (hth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user