summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index fac5088a6..d5c96168a 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1135,7 +1135,10 @@ static bool __stdcall
remove_proc (int ci)
{
if (have_execed)
- procs[ci].wait_thread->terminate_thread ();
+ {
+ if (_my_tls._ctinfo != procs[ci].wait_thread)
+ procs[ci].wait_thread->terminate_thread ();
+ }
else if (procs[ci]->exists ())
return true;