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-04-02 04:18:29 +0400
committerChristopher Faylor <me@cgf.cx>2001-04-02 04:18:29 +0400
commit1ba3935dfb61f418d81305d677475dbadfbdde3f (patch)
tree0a005fb41ff2dc7182fb8ee635b06adf83d991eb
parent0ef785e4eef1757b27f34192331031fa68021f90 (diff)
* exceptions.cc (sigframe::call_signal_handler): Return value of
call_signal_handler_now. * sigproc.h (sigframe): Use constructor. * syscalls.cc (_read): Correct errno test prior to calling signal handler.
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/exceptions.cc22
-rw-r--r--winsup/cygwin/sigproc.h2
-rw-r--r--winsup/cygwin/syscalls.cc2
4 files changed, 20 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 6cbbe5dd6..6b6cd1d57 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+Sun Apr 1 20:10:34 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * exceptions.cc (sigframe::call_signal_handler): Return value of
+ call_signal_handler_now.
+ * sigproc.h (sigframe): Use constructor.
+ * syscalls.cc (_read): Correct errno test prior to calling signal
+ handler.
+
Sun Apr 1 00:38:06 2001 Christopher Faylor <cgf@cygnus.com>
* exceptions.cc (sigframe::call_signal_handler): Move outside of "C"
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index a56b35e8e..3a3bdb918 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1119,14 +1119,22 @@ events_terminate (void)
}
extern "C" {
-static int __stdcall call_signal_handler_now ();
+static int __stdcall
+call_signal_handler_now ()
+{
+ int sa_flags = sigsave.sa_flags;
+ sigproc_printf ("sa_flags %p", sa_flags);
+ *sigsave.retaddr_on_stack = sigsave.retaddr;
+ sigdelayed0 ();
+ return sa_flags & SA_RESTART;
+}
};
int
sigframe::call_signal_handler ()
{
unregister ();
- call_signal_handler_now ();
+ return call_signal_handler_now ();
}
#define pid_offset (unsigned)(((_pinfo *)NULL)->pid)
@@ -1138,16 +1146,6 @@ reset_signal_arrived ()
sigproc_printf ("reset signal_arrived");
}
-static int __stdcall
-call_signal_handler_now ()
-{
- int sa_flags = sigsave.sa_flags;
- sigproc_printf ("sa_flags %p", sa_flags);
- *sigsave.retaddr_on_stack = sigsave.retaddr;
- sigdelayed0 ();
- return sa_flags & SA_RESTART;
-}
-
void unused_sig_wrapper ()
{
/* Signal cleanup stuff. Cleans up stack (too bad that we didn't
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 1543aa1cf..295170389 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -71,7 +71,7 @@ public:
t.get_winapi_lock ();
}
- sigframe () {st = NULL;}
+ sigframe (): st (NULL) {}
sigframe (sigthread &t, DWORD ebp = (DWORD) __builtin_frame_address (0))
{
if (!t.frame && t.id == GetCurrentThreadId ())
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 255fef147..6ec1e0595 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -273,7 +273,7 @@ _read (int fd, void *ptr, size_t len)
}
out:
- if (res >= 0 || get_errno () == EINTR || !thisframe.call_signal_handler ())
+ if (res >= 0 || get_errno () != EINTR || !thisframe.call_signal_handler ())
break;
}