* exceptions.cc (setup_handler): Avoid suspending a thread if it in a cygwin
function, in an exception, spinning, or locked. * gendef (_sigfe): Move incyg setting earlier. (sigreturn): Set incyg flag to avoid interrupting called cygwin functions. (sigdelayed): Ditto. (stabilize_sig_stack): Ditto. * sigproc.cc (proc_subproc): Don't restore process lock early in exec case. * cygtls.h: Reorganize fields in _cygtls slightly. * tlsoffsets.h: Regenerate.
This commit is contained in:
@ -786,12 +786,12 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
|
||||
#endif
|
||||
res = SuspendThread (hth);
|
||||
/* Just set pending if thread is already suspended */
|
||||
if (res || tls->incyg)
|
||||
if (res)
|
||||
{
|
||||
(void) ResumeThread (hth);
|
||||
break;
|
||||
}
|
||||
if (!tls->locked () && !tls->spinning)
|
||||
if (!tls->incyg && !tls->in_exception () && !tls->spinning && !tls->locked ())
|
||||
{
|
||||
cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
|
||||
if (!GetThreadContext (hth, &cx))
|
||||
|
Reference in New Issue
Block a user