From c5f9eed1c045ad05e968c9a9b8fb22b1d46cd8ea Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 4 Apr 2019 21:25:47 +0200 Subject: [PATCH] Cygwin: signals: make setcontext work from signal handlers Signed-off-by: Corinna Vinschen --- winsup/cygwin/exceptions.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index a9b378133..0aaeee52f 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1867,6 +1867,7 @@ setcontext (const ucontext_t *ucp) { PCONTEXT ctx = (PCONTEXT) &ucp->uc_mcontext; _my_tls.sigmask = ucp->uc_sigmask; + _my_tls.incyg = true; #ifdef __x86_64__ /* Apparently a call to NtContinue works on 64 bit as well, but using RtlRestoreContext is the blessed way. */