summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-08-03 14:54:02 +0200
committerCorinna Vinschen <corinna@vinschen.de>2017-08-03 14:54:02 +0200
commit54ed68a781fe8a36d08352503524e61534a25e07 (patch)
tree3351c07ab89c4b6fae0d38995f76f869510eac24
parenta1c2491f70a5f232ab6a477e9575fdd90336a1bb (diff)
downloadcygnal-54ed68a781fe8a36d08352503524e61534a25e07.tar.gz
cygnal-54ed68a781fe8a36d08352503524e61534a25e07.tar.bz2
cygnal-54ed68a781fe8a36d08352503524e61534a25e07.zip
cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/include/cygwin/signal.h3
-rw-r--r--winsup/cygwin/signal.cc25
2 files changed, 17 insertions, 11 deletions
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
index af0833688..a8c852ddb 100644
--- a/winsup/cygwin/include/cygwin/signal.h
+++ b/winsup/cygwin/include/cygwin/signal.h
@@ -265,8 +265,7 @@ enum
SI_MESGQ, /* sent by real time mesq state change
(currently unimplemented) */
SI_TIMER, /* sent by timer expiration */
- SI_QUEUE, /* sent by sigqueue (currently
- unimplemented) */
+ SI_QUEUE, /* sent by sigqueue */
SI_KERNEL, /* sent by system */
ILL_ILLOPC, /* illegal opcode */
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index fbd2b241e..4b63e9917 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -623,14 +623,9 @@ 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)
+int
+__SYS_rt_sigqueueinfo (pid_t pid, int sig, siginfo_t *si)
{
- siginfo_t si = {0};
pinfo dest (pid);
if (!dest)
{
@@ -639,15 +634,27 @@ sigqueue (pid_t pid, int sig, const union sigval value)
}
if (sig == 0)
return 0;
- if (sig < 0 || sig >= NSIG)
+ if (sig < 0 || sig >= NSIG
+ || !si || si->si_code < SI_ASYNCIO || si->si_code > SI_KERNEL)
{
set_errno (EINVAL);
return -1;
}
+ return sig_send (dest, *si);
+}
+
+/* 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)
+{
+ siginfo_t si = {0};
si.si_signo = sig;
si.si_code = SI_QUEUE;
si.si_value = value;
- return sig_send (dest, si);
+ return __SYS_rt_sigqueueinfo (pid, sig, &si);
}
extern "C" int