From 673a6913728d964c470470ca704d17ac74f07603 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 28 Oct 2011 17:32:38 +0000 Subject: [PATCH] * exceptions.cc (sigpacket::process): Avoid a potential deadlock when exiting due to a signal. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/exceptions.cc | 1 + 2 files changed, 6 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2ad220cb4..07ba4f9ca 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-10-28 Christopher Faylor + + * exceptions.cc (sigpacket::process): Avoid a potential deadlock when + exiting due to a signal. + 2011-10-28 Corinna Vinschen * cygwin.din (getgrouplist): Export. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index a5e0e874a..aef82018d 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1321,6 +1321,7 @@ exit_sig: if (cygheap->rlim_core > 0UL) si.si_signo |= 0x80; } + SetEvent (signal_arrived); // To avoid a potential deadlock with proc_lock sigproc_printf ("signal %d, about to call do_exit", si.si_signo); use_tls->signal_exit (si.si_signo); /* never returns */ }