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>2005-09-26 18:51:48 +0400
committerChristopher Faylor <me@cgf.cx>2005-09-26 18:51:48 +0400
commitd5f4ee62b706f7cfe22a92fd796dc36382690950 (patch)
treecde2c46f08aab9c699af1a2d3d8f57e5ba1ead60 /winsup/cygwin/signal.cc
parent683cc8189ce70bb5f33bec465eebad6effc9bd36 (diff)
* exceptions.cc (handle_exceptions): Just si_code to SI_KERNEL first and let it
be overridden. * exceptions.cc (_cygtls::call_signal_handler): Call signal handler with extra siginfo_t * and void * parameters when SA_SIGINFO flag is set. * signal.cc (signal): Clear SA_SIGINFO flag. (sigqueue): Fix incorrect setting of si_code. * sigproc.cc (signal_fixup_after_exec): Clear SA_SIGINFO flag when setting handler to SIG_DFL.
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r--winsup/cygwin/signal.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 156fbec39..443d9ec6f 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -63,6 +63,7 @@ signal (int sig, _sig_func_ptr func)
/* SA_RESTART is set to maintain BSD compatible signal behaviour by default.
This is also compatible with the behaviour of signal(2) in Linux. */
global_sigs[sig].sa_flags |= SA_RESTART;
+ global_sigs[sig].sa_flags &= ~ SA_SIGINFO;
set_sigcatchers (prev, func);
syscall_printf ("%p = signal (%d, %p)", prev, sig, func);
@@ -524,6 +525,10 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info)
return res;
}
+/* FIXME: SUSv3 says that this function should block until the signal has
+ actually been delivered. Currently, this will only happen when sending
+ signals to the current process. It will not happen when sending signals
+ to other processes. */
extern "C" int
sigqueue (pid_t pid, int sig, const union sigval value)
{
@@ -535,7 +540,7 @@ sigqueue (pid_t pid, int sig, const union sigval value)
return -1;
}
si.si_signo = sig;
- si.si_code = SI_USER;
+ si.si_code = SI_QUEUE;
si.si_pid = si.si_uid = si.si_errno = 0;
si.si_value = value;
return sig_send (dest, si);