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>2001-09-12 09:09:24 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-12 09:09:24 +0400
commitaed6988a36fc02261ad4deee685f0a3e75ed4cdf (patch)
tree409e174a2fd2929527a6333777fbc29aa1505b9d /winsup/cygwin/exceptions.cc
parentff6e295ebf83b89fdcedce78362fd2d9e20e3c95 (diff)
* exceptions.cc (call_signal_handler_now): Add additional guard against
inappropriately calling signal handler. * syscalls.cc (_read): Reset errno if not exiting due to signal.
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 bf4a4446e..37607cd8e 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1127,6 +1127,12 @@ extern "C" {
static int __stdcall
call_signal_handler_now ()
{
+ if (!sigsave.sig)
+ {
+ sigproc_printf ("call_signal_handler_now called when no signal active");
+ return 0;
+ }
+
int sa_flags = sigsave.sa_flags;
sigproc_printf ("sa_flags %p", sa_flags);
*sigsave.retaddr_on_stack = sigsave.retaddr;