aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-11-22 20:51:13 +0000
committerChristopher Faylor <me@cgf.cx>2002-11-22 20:51:13 +0000
commita0d3c309e4e9ea6aab9b058c2e3c68b8deff9c71 (patch)
treea83399354edc1487e7b6663be693d146869d5c0c /winsup/cygwin/sigproc.cc
parent2955fd7669437cb13d2b228b5f1b6c1dda58fa34 (diff)
downloadnewlib-a0d3c309e4e9ea6aab9b058c2e3c68b8deff9c71.zip
newlib-a0d3c309e4e9ea6aab9b058c2e3c68b8deff9c71.tar.gz
newlib-a0d3c309e4e9ea6aab9b058c2e3c68b8deff9c71.tar.bz2
* exceptions.cc (handle_sigsuspend): Force pending signal delivery before
waiting for signals to happen. * signal.cc (sleep): Force pending signal delivery before sleeping. (usleep): Ditto. (signal): Force pending signal delivery before manipulating signal stuff. (sigprocmask): Ditto. (kill_worker): Ditto. (abort): Ditto. (sigaction): Ditto. * syscalls.cc (readv): Force pending signal delivery before I/O. (writev): Ditto. (open): Ditto. * net.cc: Ditto, throughout. * sigproc.cc (sig_dispatch_pending): Deliver any pending signals prior to returning. * tty.cc (tty::make_pipes): Increase pipe buffer size.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index aeb51f2..862093c 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -516,6 +516,12 @@ sig_dispatch_pending (int justwake)
{
if (!hwait_sig)
return 0;
+ DWORD tid = GetCurrentThreadId ();
+
+ sigframe thisframe (mainthread);
+
+ if (tid == sigtid && !justwake)
+ justwake = 1;
int was_pending = pending_signals;
#ifdef DEBUGGING
@@ -544,6 +550,9 @@ sig_dispatch_pending (int justwake)
system_printf ("%E releasing sigcatch_nosync(%p)", sigcatch_nosync);
}
+ if (was_pending && !justwake)
+ thisframe.call_signal_handler ();
+
return was_pending;
}