diff options
author | Christopher Faylor <me@cgf.cx> | 2002-11-22 20:51:13 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-11-22 20:51:13 +0000 |
commit | a0d3c309e4e9ea6aab9b058c2e3c68b8deff9c71 (patch) | |
tree | a83399354edc1487e7b6663be693d146869d5c0c /winsup/cygwin/signal.cc | |
parent | 2955fd7669437cb13d2b228b5f1b6c1dda58fa34 (diff) | |
download | newlib-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/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 010df9b..a23487f 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -43,6 +43,7 @@ set_sigcatchers (void (*oldsig) (int), void (*cursig) (int)) extern "C" _sig_func_ptr signal (int sig, _sig_func_ptr func) { + sig_dispatch_pending (0); _sig_func_ptr prev; /* check that sig is in right range */ @@ -69,6 +70,7 @@ extern "C" unsigned int sleep (unsigned int seconds) { int rc; + sig_dispatch_pending (0); sigframe thisframe (mainthread); DWORD ms, start_time, end_time; @@ -95,6 +97,7 @@ sleep (unsigned int seconds) extern "C" unsigned int usleep (unsigned int useconds) { + sig_dispatch_pending (0); syscall_printf ("usleep (%d)", useconds); WaitForSingleObject (signal_arrived, (useconds + 500) / 1000); syscall_printf ("0 = usleep (%d)", useconds); @@ -104,6 +107,7 @@ usleep (unsigned int useconds) extern "C" int sigprocmask (int sig, const sigset_t *set, sigset_t *oldset) { + sig_dispatch_pending (0); /* check that sig is in right range */ if (sig < 0 || sig >= NSIG) { @@ -143,6 +147,8 @@ sigprocmask (int sig, const sigset_t *set, sigset_t *oldset) static int kill_worker (pid_t pid, int sig) { + sig_dispatch_pending (0); + int res = 0; pinfo dest (pid); BOOL sendSIGCONT; @@ -261,6 +267,7 @@ killpg (pid_t pgrp, int sig) extern "C" void abort (void) { + sig_dispatch_pending (0); sigframe thisframe (mainthread); /* Flush all streams as per SUSv2. From my reading of this document, this isn't strictly correct. @@ -286,6 +293,7 @@ abort (void) extern "C" int sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact) { + sig_dispatch_pending (0); sigproc_printf ("signal %d, newact %p, oldact %p", sig, newact, oldact); /* check that sig is in right range */ if (sig < 0 || sig >= NSIG) |