Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2014-03-09 23:25:38 +0400
committerChristopher Faylor <me@cgf.cx>2014-03-09 23:25:38 +0400
commitbc7c78b225a2b0195c02135d75d5f014b70c9426 (patch)
tree4e2154e7e84b778b559b6ae988837d0f8d98ca2d /winsup/cygwin/sigproc.cc
parente8036b41ab5b106448a5211d08d2fba65fa9d931 (diff)
* sigproc.cc (_cygtls::remove_wq): Reset thread_ev inside of lock. Set to NULL
when done.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 71b407d28..5525271ca 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -336,6 +336,8 @@ _cygtls::remove_wq (DWORD wait)
if (exit_state < ES_FINAL && waitq_head.next && sync_proc_subproc
&& sync_proc_subproc.acquire (wait))
{
+ ForceCloseHandle1 (wq.thread_ev, wq_ev);
+ wq.thread_ev = NULL;
for (waitq *w = &waitq_head; w->next != NULL; w = w->next)
if (w->next == &wq)
{
@@ -344,7 +346,6 @@ _cygtls::remove_wq (DWORD wait)
}
sync_proc_subproc.release ();
}
- ForceCloseHandle1 (wq.thread_ev, wq_ev);
}
}