summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 8b208b973..3395a1eea 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1007,6 +1007,12 @@ signal_exit (int rc)
/* If the exception handler gets a trap, we could recurse awhile.
If this is non-zero, skip the cleaning up and exit NOW. */
+ muto *m;
+ /* FIXME: Make multi-thread aware */
+ for (m = muto_start.next; m != NULL; m = m->next)
+ if (m->unstable () || m->owner () == mainthread.id)
+ m->reset ();
+
rc = EXIT_SIGNAL | (rc << 8);
if (exit_already++)
{